[llvm-commits] [llvm] r43150 - in /llvm/trunk: include/llvm/Target/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/IA64/ lib/Target/Mips/ lib/Target/PowerPC/ lib/Target/Sparc/ lib/Target/X86/

Evan Cheng evan.cheng at apple.com
Thu Oct 18 18:43:18 PDT 2007


On Oct 18, 2007, at 3:53 PM, Chris Lattner wrote:

>> URL: http://llvm.org/viewvc/llvm-project?rev=43150&view=rev
>> Log:
>> Use SmallVectorImpl instead of SmallVector with hardcoded size in
>> MRegister public interface.
>
> Cool, one additional thing:
>
>> +++ llvm/trunk/include/llvm/Target/MRegisterInfo.h Thu Oct 18
>> 16:29:24 2007
>> @@ -508,9 +508,9 @@
>>                                    const TargetRegisterClass *RC)
>> const = 0;
>>
>>   virtual void storeRegToAddr(MachineFunction &MF, unsigned SrcReg,
>> -                              SmallVector<MachineOperand,4> Addr,
>> +                              SmallVectorImpl<MachineOperand> Addr,
>
> This should pass the vector by reference to avoid slicing in this
> case and for performance.

It was a copy and paste bug that's already fixed in a subsequent patch.

Evan

>
>
>>   virtual void loadRegFromAddr(MachineFunction &MF, unsigned DestReg,
>> +                               SmallVectorImpl<MachineOperand> Addr,
>
> Likewise
>
> -Chris
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list