diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-06-20 17:45:33 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-06-20 17:45:33 +0000 |
commit | 959e9c8d01dafcf45a7020fb97bbed61a149f084 (patch) | |
tree | 900f276d64cd77627afac9aea3d31289b6076017 /llvm/lib/Target/ARM/ARMFastISel.cpp | |
parent | 535089426555f15d891a1898dcfecc1c83e54084 (diff) | |
download | llvm-959e9c8d01dafcf45a7020fb97bbed61a149f084.zip llvm-959e9c8d01dafcf45a7020fb97bbed61a149f084.tar.gz llvm-959e9c8d01dafcf45a7020fb97bbed61a149f084.tar.bz2 |
Use shouldAssumeDSOLocal.
With this ARM fast isel knows that PIE variable are not preemptable.
llvm-svn: 273169
Diffstat (limited to 'llvm/lib/Target/ARM/ARMFastISel.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMFastISel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp index 01a5997..cbd96a7 100644 --- a/llvm/lib/Target/ARM/ARMFastISel.cpp +++ b/llvm/lib/Target/ARM/ARMFastISel.cpp @@ -2967,8 +2967,10 @@ bool ARMFastISel::tryToFoldLoadIntoMI(MachineInstr *MI, unsigned OpNo, unsigned ARMFastISel::ARMLowerPICELF(const GlobalValue *GV, unsigned Align, MVT VT) { + Reloc::Model RM = TM.getRelocationModel(); + const Triple &TargetTriple = TM.getTargetTriple(); bool UseGOT_PREL = - !(GV->hasHiddenVisibility() || GV->hasLocalLinkage()); + !shouldAssumeDSOLocal(RM, TargetTriple, *GV->getParent(), GV); LLVMContext *Context = &MF->getFunction()->getContext(); unsigned ARMPCLabelIndex = AFI->createPICLabelUId(); |