[CodeGen] Use ArrayRef instead of std::vector&. NFC.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Thu, 19 Feb 2015 23:13:10 +0000 (23:13 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Thu, 19 Feb 2015 23:13:10 +0000 (23:13 +0000)
The former lets us use SmallVectors.  Do so in ARM and AArch64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229925 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/Target/AArch64/AArch64ISelLowering.cpp
lib/Target/ARM/ARMISelLowering.cpp

index c8a717327afb6a9937204eee607d09a5375de1d0..d320bf1c30a5341ad7274357886fcfe2d4011b63 100644 (file)
@@ -2176,8 +2176,7 @@ public:
 
     void AddToWorklist(SDNode *N);
     void RemoveFromWorklist(SDNode *N);
-    SDValue CombineTo(SDNode *N, const std::vector<SDValue> &To,
-                      bool AddTo = true);
+    SDValue CombineTo(SDNode *N, ArrayRef<SDValue> To, bool AddTo = true);
     SDValue CombineTo(SDNode *N, SDValue Res, bool AddTo = true);
     SDValue CombineTo(SDNode *N, SDValue Res0, SDValue Res1, bool AddTo = true);
 
index 3c13b611ce2c5b7fa713fe6b99246acdebc90fa4..e8d1acf60ab1cbfef1e0ba1f49d475a95dbbdec8 100644 (file)
@@ -466,7 +466,7 @@ void TargetLowering::DAGCombinerInfo::RemoveFromWorklist(SDNode *N) {
 }
 
 SDValue TargetLowering::DAGCombinerInfo::
-CombineTo(SDNode *N, const std::vector<SDValue> &To, bool AddTo) {
+CombineTo(SDNode *N, ArrayRef<SDValue> To, bool AddTo) {
   return ((DAGCombiner*)DC)->CombineTo(N, &To[0], To.size(), AddTo);
 }
 
index c4b73955960efde74c3c132522da59ea47e628ad..481a039474e7acb957b55a6349010d061b540ba0 100644 (file)
@@ -7973,7 +7973,7 @@ static SDValue performPostLD1Combine(SDNode *N,
                                            LoadSDN->getMemOperand());
 
     // Update the uses.
-    std::vector<SDValue> NewResults;
+    SmallVector<SDValue, 2> NewResults;
     NewResults.push_back(SDValue(LD, 0));             // The result of load
     NewResults.push_back(SDValue(UpdN.getNode(), 2)); // Chain
     DCI.CombineTo(LD, NewResults);
index 6aaf880583dc77c8bb91f4cee224719451de906c..d4375f88b41cb35c9b1e48ea34da4b0460af1001 100644 (file)
@@ -8990,7 +8990,7 @@ static SDValue CombineBaseUpdate(SDNode *N,
                                            MemInt->getMemOperand());
 
     // Update the uses.
-    std::vector<SDValue> NewResults;
+    SmallVector<SDValue, 5> NewResults;
     for (unsigned i = 0; i < NumResultVecs; ++i) {
       NewResults.push_back(SDValue(UpdN.getNode(), i));
     }