[llvm-commits] [llvm] r79553 - in /llvm/trunk: lib/Target/X86/X86ISelDAGToDAG.cpp test/CodeGen/X86/abi-isel.ll test/CodeGen/X86/codemodel.ll test/CodeGen/X86/rip-rel-address.ll

Dan Gohman gohman at apple.com
Thu Aug 20 16:40:59 PDT 2009


On Aug 20, 2009, at 2:30 PM, Chris Lattner wrote:


>
> On Aug 20, 2009, at 11:23 AM, Dan Gohman wrote:
>
>
>> Author: djg
>>
>> Date: Thu Aug 20 13:23:44 2009
>>
>> New Revision: 79553
>>
>>
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=79553&view=rev
>>
>> Log:
>>
>> Fix an x86 code size regression: prefer RIP-relative addressing
>>
>> over absolute addressing even in non-PIC mode (unless the address
>>
>> has an index or something else incompatible), because it has a
>>
>> smaller encoding.
>>
>
> Hi Dan,
>
> Are you sure sure that this is safe?  Unless you have a strong  
> reason not to, I'd prefer to hold this until after 2.6.

LLVM has done this for quite a while; it was only recently lost in the
AsmPrinter whirlwind. The x86-64 ABI document has a sentence dedicated
to explicitly permitting this. The ABI document also uses this in all
relevant examples. And, it's what GCC does. So yes, I'm fairly sure
it's safe.

Dan




More information about the llvm-commits mailing list