[llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelLowering.cpp
Evan Cheng
evan.cheng at apple.com
Thu May 3 17:36:55 PDT 2007
No idea. Lauro?
Evan
On May 3, 2007, at 5:33 PM, Chris Lattner wrote:
>
> On May 3, 2007, at 5:27 PM, Evan Cheng wrote:
>
>>
>>
>> Changes in directory llvm/lib/Target/ARM:
>>
>> ARMISelLowering.cpp updated: 1.49 -> 1.50
>> ---
>> Log message:
>>
>> On Mac OS X, GV requires an extra load only when relocation-model
>> is non-static.
>
> Does ELF do something similar? If not, this should probably be
> method on ARMSubTarget, like the X86 backend does.
>
> -Chris
>
>> ---
>> Diffs of the changes: (+6 -5)
>>
>> ARMISelLowering.cpp | 11 ++++++-----
>> 1 files changed, 6 insertions(+), 5 deletions(-)
>>
>>
>> Index: llvm/lib/Target/ARM/ARMISelLowering.cpp
>> diff -u llvm/lib/Target/ARM/ARMISelLowering.cpp:1.49 llvm/lib/
>> Target/ARM/ARMISelLowering.cpp:1.50
>> --- llvm/lib/Target/ARM/ARMISelLowering.cpp:1.49 Thu May 3
>> 15:28:35 2007
>> +++ llvm/lib/Target/ARM/ARMISelLowering.cpp Thu May 3 19:26:58 2007
>> @@ -812,10 +812,11 @@
>> }
>>
>> /// GVIsIndirectSymbol - true if the GV will be accessed via an
>> indirect symbol
>> -/// even in dynamic-no-pic mode.
>> -static bool GVIsIndirectSymbol(GlobalValue *GV) {
>> - return (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() ||
>> - (GV->isDeclaration() && !GV->hasNotBeenReadFromBytecode
>> ()));
>> +/// even in non-static mode.
>> +static bool GVIsIndirectSymbol(GlobalValue *GV, Reloc::Model
>> RelocM) {
>> + return RelocM != Reloc::Static &&
>> + (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() ||
>> + (GV->isDeclaration() && !GV->hasNotBeenReadFromBytecode()));
>> }
>>
>> SDOperand ARMTargetLowering::LowerGlobalAddressDarwin(SDOperand Op,
>> @@ -823,7 +824,7 @@
>> MVT::ValueType PtrVT = getPointerTy();
>> GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
>> Reloc::Model RelocM = getTargetMachine().getRelocationModel();
>> - bool IsIndirect = GVIsIndirectSymbol(GV);
>> + bool IsIndirect = GVIsIndirectSymbol(GV, RelocM);
>> SDOperand CPAddr;
>> if (RelocM == Reloc::Static)
>> CPAddr = DAG.getTargetConstantPool(GV, PtrVT, 2);
>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> 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