diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2012-11-21 20:16:34 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-11-21 20:16:34 +0000 |
commit | 59be760f61d54e24bae70c4465021a6f0746d278 (patch) | |
tree | 6a94803b528683a62ea038be81d9f83ed9afe758 /lib | |
parent | b546d5a30d9947476c379d66cf6246685fea0502 (diff) | |
download | external_llvm-59be760f61d54e24bae70c4465021a6f0746d278.zip external_llvm-59be760f61d54e24bae70c4465021a6f0746d278.tar.gz external_llvm-59be760f61d54e24bae70c4465021a6f0746d278.tar.bz2 |
[mips] When a node which loads from a GOT is created, pass a MachinePointerInfo
referring to a GOT entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168453 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/Mips/MipsISelLowering.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Target/Mips/MipsISelLowering.cpp b/lib/Target/Mips/MipsISelLowering.cpp index 6202ae9..b1c3477 100644 --- a/lib/Target/Mips/MipsISelLowering.cpp +++ b/lib/Target/Mips/MipsISelLowering.cpp @@ -1775,7 +1775,8 @@ SDValue MipsTargetLowering::LowerGlobalAddress(SDValue Op, SDValue GA = DAG.getTargetGlobalAddress(GV, dl, ValTy, 0, GotFlag); GA = DAG.getNode(MipsISD::Wrapper, dl, ValTy, GetGlobalReg(DAG, ValTy), GA); SDValue ResNode = DAG.getLoad(ValTy, dl, DAG.getEntryNode(), GA, - MachinePointerInfo(), false, false, false, 0); + MachinePointerInfo::getGOT(), false, false, + false, 0); // On functions and global targets not internal linked only // a load from got/GP is necessary for PIC to work. if (!HasGotOfst) @@ -1812,7 +1813,8 @@ SDValue MipsTargetLowering::LowerBlockAddress(SDValue Op, GetGlobalReg(DAG, ValTy), BAGOTOffset); SDValue BALOOffset = DAG.getTargetBlockAddress(BA, ValTy, 0, OFSTFlag); SDValue Load = DAG.getLoad(ValTy, dl, DAG.getEntryNode(), BAGOTOffset, - MachinePointerInfo(), false, false, false, 0); + MachinePointerInfo::getGOT(), false, false, false, + 0); SDValue Lo = DAG.getNode(MipsISD::Lo, dl, ValTy, BALOOffset); return DAG.getNode(ISD::ADD, dl, ValTy, Load, Lo); } @@ -1919,7 +1921,7 @@ LowerJumpTable(SDValue Op, SelectionDAG &DAG) const JTI = DAG.getNode(MipsISD::Wrapper, dl, PtrVT, GetGlobalReg(DAG, PtrVT), JTI); HiPart = DAG.getLoad(PtrVT, dl, DAG.getEntryNode(), JTI, - MachinePointerInfo(), false, false, false, 0); + MachinePointerInfo::getGOT(), false, false, false, 0); JTILo = DAG.getTargetJumpTable(JT->getIndex(), PtrVT, OfstFlag); } @@ -1962,7 +1964,7 @@ LowerConstantPool(SDValue Op, SelectionDAG &DAG) const N->getOffset(), GOTFlag); CP = DAG.getNode(MipsISD::Wrapper, dl, ValTy, GetGlobalReg(DAG, ValTy), CP); SDValue Load = DAG.getLoad(ValTy, dl, DAG.getEntryNode(), CP, - MachinePointerInfo::getConstantPool(), false, + MachinePointerInfo::getGOT(), false, false, false, 0); SDValue CPLo = DAG.getTargetConstantPool(C, ValTy, N->getAlignment(), N->getOffset(), OFSTFlag); |