diff options
author | Asaf Badouh <asaf.badouh@intel.com> | 2016-04-17 08:28:40 +0000 |
---|---|---|
committer | Asaf Badouh <asaf.badouh@intel.com> | 2016-04-17 08:28:40 +0000 |
commit | aec79651c1ee790d37a12c7fde55f9325dd432a0 (patch) | |
tree | 68665108be20d3db2b599e2f4ae0e0a6430c479d | |
parent | f9521b0bb7fa9a502170f1dd4dd16a1dab75cdfc (diff) | |
download | bcm5719-llvm-aec79651c1ee790d37a12c7fde55f9325dd432a0.tar.gz bcm5719-llvm-aec79651c1ee790d37a12c7fde55f9325dd432a0.zip |
[X86] Remove unneeded variables
no functional change.
ExtraLoad and WrapperKind are been used only if (OpFlags == X86II::MO_GOTPCREL).
Differential Revision: http://reviews.llvm.org/D18942
llvm-svn: 266557
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 094f2814fb0..9d57ccd22b9 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -3328,8 +3328,6 @@ X86TargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI, const GlobalValue *GV = G->getGlobal(); if (!GV->hasDLLImportStorageClass()) { unsigned char OpFlags = 0; - bool ExtraLoad = false; - unsigned WrapperKind = ISD::DELETED_NODE; // On ELF targets, in both X86-64 and X86-32 mode, direct calls to // external symbols most go through the PLT in PIC mode. If the symbol @@ -3353,23 +3351,21 @@ X86TargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI, // which loads from the GOT directly. This avoids runtime overhead // at the cost of eager binding (and one extra byte of encoding). OpFlags = X86II::MO_GOTPCREL; - WrapperKind = X86ISD::WrapperRIP; - ExtraLoad = true; } Callee = DAG.getTargetGlobalAddress( GV, dl, getPointerTy(DAG.getDataLayout()), G->getOffset(), OpFlags); - // Add a wrapper if needed. - if (WrapperKind != ISD::DELETED_NODE) + if (OpFlags == X86II::MO_GOTPCREL) { + // Add a wrapper. Callee = DAG.getNode(X86ISD::WrapperRIP, dl, - getPointerTy(DAG.getDataLayout()), Callee); - // Add extra indirection if needed. - if (ExtraLoad) + getPointerTy(DAG.getDataLayout()), Callee); + // Add extra indirection Callee = DAG.getLoad( - getPointerTy(DAG.getDataLayout()), dl, DAG.getEntryNode(), Callee, - MachinePointerInfo::getGOT(DAG.getMachineFunction()), false, false, - false, 0); + getPointerTy(DAG.getDataLayout()), dl, DAG.getEntryNode(), Callee, + MachinePointerInfo::getGOT(DAG.getMachineFunction()), false, false, + false, 0); + } } } else if (ExternalSymbolSDNode *S = dyn_cast<ExternalSymbolSDNode>(Callee)) { unsigned char OpFlags = 0; |