From: Chad Rosier Date: Wed, 15 Feb 2012 00:23:55 +0000 (+0000) Subject: Use a temporary variable, rather then a series of redundant calls. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=92fd01736484262fef049b7358366d8eab2f857e;p=oota-llvm.git Use a temporary variable, rather then a series of redundant calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150536 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp index cc9d42a86c0..bd0a64c542c 100644 --- a/lib/Target/ARM/ARMFastISel.cpp +++ b/lib/Target/ARM/ARMFastISel.cpp @@ -2207,10 +2207,11 @@ bool ARMFastISel::SelectCall(const Instruction *I, SmallVector ArgRegs; SmallVector ArgVTs; SmallVector ArgFlags; - Args.reserve(CS.arg_size()); - ArgRegs.reserve(CS.arg_size()); - ArgVTs.reserve(CS.arg_size()); - ArgFlags.reserve(CS.arg_size()); + unsigned arg_size = CS.arg_size(); + Args.reserve(arg_size); + ArgRegs.reserve(arg_size); + ArgVTs.reserve(arg_size); + ArgFlags.reserve(arg_size); for (ImmutableCallSite::arg_iterator i = CS.arg_begin(), e = CS.arg_end(); i != e; ++i) { // If we're lowering a memory intrinsic instead of a regular call, skip the