[llvm] r225943 - NVPTX: Remove bogus remap logic for global variable address spaces
Duncan P. N. Exon Smith
dexonsmith at apple.com
Tue Jan 13 21:13:18 PST 2015
Author: dexonsmith
Date: Tue Jan 13 23:13:18 2015
New Revision: 225943
URL: http://llvm.org/viewvc/llvm-project?rev=225943&view=rev
Log:
NVPTX: Remove bogus remap logic for global variable address spaces
The comment is incorrect, and the code mangles debug info. Remove the
bad logic, which wasn't tested anyway.
Modified:
llvm/trunk/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp?rev=225943&r1=225942&r2=225943&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp Tue Jan 13 23:13:18 2015
@@ -408,19 +408,8 @@ MDNode *GenericToNVVM::remapMDNode(Modul
} else if (auto *C = dyn_cast<ConstantAsMetadata>(Operand)) {
if (auto *G = dyn_cast<GlobalVariable>(C->getValue())) {
GVMapTy::iterator I = GVMap.find(G);
- if (I != GVMap.end()) {
+ if (I != GVMap.end())
NewOperand = ConstantAsMetadata::get(I->second);
- if (++i < NumOperands) {
- NewOperands.push_back(NewOperand);
- // Address space of the global variable follows the global
- // variable
- // in the global variable debug info (see createGlobalVariable in
- // lib/Analysis/DIBuilder.cpp).
- NewOperand = ConstantAsMetadata::get(
- ConstantInt::get(Type::getInt32Ty(M->getContext()),
- I->second->getType()->getAddressSpace()));
- }
- }
}
}
}
More information about the llvm-commits
mailing list