llvm.org GIT mirror llvm / 1dcdcc0
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225943 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan P. N. Exon Smith 4 years ago
1 changed file(s) with 1 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
407407 } else if (auto *C = dyn_cast(Operand)) {
408408 if (auto *G = dyn_cast(C->getValue())) {
409409 GVMapTy::iterator I = GVMap.find(G);
410 if (I != GVMap.end()) {
410 if (I != GVMap.end())
411411 NewOperand = ConstantAsMetadata::get(I->second);
412 if (++i < NumOperands) {
413 NewOperands.push_back(NewOperand);
414 // Address space of the global variable follows the global
415 // variable
416 // in the global variable debug info (see createGlobalVariable in
417 // lib/Analysis/DIBuilder.cpp).
418 NewOperand = ConstantAsMetadata::get(
419 ConstantInt::get(Type::getInt32Ty(M->getContext()),
420 I->second->getType()->getAddressSpace()));
421 }
422 }
423412 }
424413 }
425414 }