Make this code more efficient.
authorDavid Greene <greened@obbligato.org>
Mon, 6 Aug 2007 15:09:17 +0000 (15:09 +0000)
committerDavid Greene <greened@obbligato.org>
Mon, 6 Aug 2007 15:09:17 +0000 (15:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40861 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LowerGC.cpp

index a3c4a41086f336e9d8f4b21992abd4339e381e05..d9456094fc828009200021c60f2c465e3d295d02 100644 (file)
@@ -205,11 +205,11 @@ bool LowerGC::runOnFunction(Function &F) {
                 // conversion from Use* to Value*.  The conversion
                 // from Use to Value * is not useful because the
                 // memory for Value * won't be contiguous.
-                SmallVector<Value *, 2> Args;
-                Args.push_back(CI->getOperand(1));
-                Args.push_back(CI->getOperand(2));
-                CallInst *NC = new CallInst(GCRead, Args.begin(),
-                                            Args.end(),
+                Value* Args[] = {
+                  CI->getOperand(1),
+                  CI->getOperand(2) 
+                };
+                CallInst *NC = new CallInst(GCRead, Args, Args + 2,
                                             CI->getName(), CI);
                 // These functions only deal with ptr type results so BitCast
                 // is the correct kind of cast (no-op cast).