diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-06-22 21:56:34 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-06-22 21:56:34 +0000 |
commit | 45bb5c69a0fe1294de6349cba49cb9a3e7641977 (patch) | |
tree | 10d85683a2ba8b17424d19f0c6afe2f007613592 | |
parent | 47efe1f6db1020674418be247e7ff499362cc09b (diff) | |
download | bcm5719-llvm-45bb5c69a0fe1294de6349cba49cb9a3e7641977.tar.gz bcm5719-llvm-45bb5c69a0fe1294de6349cba49cb9a3e7641977.zip |
Extract a few variables to make 'if' smaller. NFC.
llvm-svn: 273497
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 11e53dc0e79..68d1a679e83 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -4284,13 +4284,14 @@ PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag, SDValue &Chain, // A call to a TLS address is actually an indirect call to a // thread-specific pointer. unsigned OpFlags = 0; - if ((DAG.getTarget().getRelocationModel() != Reloc::Static && - (Subtarget.getTargetTriple().isMacOSX() && - Subtarget.getTargetTriple().isMacOSXVersionLT(10, 5)) && - !G->getGlobal()->isStrongDefinitionForLinker()) || - (Subtarget.isTargetELF() && !isPPC64 && - !G->getGlobal()->hasLocalLinkage() && - DAG.getTarget().getRelocationModel() == Reloc::PIC_)) { + Reloc::Model RM = DAG.getTarget().getRelocationModel(); + const Triple &TargetTriple = Subtarget.getTargetTriple(); + const GlobalValue *GV = G->getGlobal(); + if ((RM != Reloc::Static && + (TargetTriple.isMacOSX() && TargetTriple.isMacOSXVersionLT(10, 5)) && + !GV->isStrongDefinitionForLinker()) || + (Subtarget.isTargetELF() && !isPPC64 && !GV->hasLocalLinkage() && + RM == Reloc::PIC_)) { // PC-relative references to external symbols should go through $stub, // unless we're building with the leopard linker or later, which // automatically synthesizes these stubs. |