[llvm-commits] [llvm] r40660 - in /llvm/trunk: include/llvm/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/CodeGen/ lib/ExecutionEngine/JIT/ lib/Transforms/IPO/ lib/Transforms/Instrumentation/ lib/Transforms/Scalar/ lib/Transforms/Utils/ lib/VMCore/ tools/bugpoint/ tools/llvm-upgrade/

Chris Lattner clattner at apple.com
Thu Aug 2 14:37:13 PDT 2007


On Aug 2, 2007, at 2:34 PM, David A. Greene wrote:

> On Wednesday 01 August 2007 08:49, Gordon Henriksen wrote:
>
>> Can't you just use
>>
>>                   Value* Args[] = { CI->GetOperand(1),
>>                                     CI->GetOperand(2) };
>>                   CallInst *NC = new CallInst(GCRead, Args, Args + 2,
>>                                               CI->getName(), CI);
>>
>> here and in UpgradeParser.y?
>
> Yep.  Do people prefer that?  I'll change it if so.

Yes please.  SmallVector's are still variable sized (like  
std::vector) so they have a slight amount of overhead compared to  
arrays.  If you can use a fixed-size array, they are better.

Thanks David,

-Chris



More information about the llvm-commits mailing list