diff options
author | Stephen Tozer <stephen.tozer@sony.com> | 2019-05-15 13:41:44 +0000 |
---|---|---|
committer | Stephen Tozer <stephen.tozer@sony.com> | 2019-05-15 13:41:44 +0000 |
commit | 0d02f2ff4fbe969f56a115464792b3898379018b (patch) | |
tree | eafdbe550805630438d465ac1efe35dc8791f385 /llvm/lib/Transforms/Utils/Local.cpp | |
parent | 17dd4d7403770bd683675e45f5517e0cdb8f9b2b (diff) | |
download | bcm5719-llvm-0d02f2ff4fbe969f56a115464792b3898379018b.tar.gz bcm5719-llvm-0d02f2ff4fbe969f56a115464792b3898379018b.zip |
Revert "[Salvage] Change salvage debug info implementation to use DW_OP_LLVM_convert where needed"
This reverts r360772 due to build issues.
Reverted commit: 17dd4d7403770bd683675e45f5517e0cdb8f9b2b.
llvm-svn: 360773
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 04e6cbb20c3..2a4e9054273 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -1690,27 +1690,8 @@ DIExpression *llvm::salvageDebugInfoImpl(Instruction &I, // No-op casts and zexts are irrelevant for debug info. if (CI->isNoopCast(DL) || isa<ZExtInst>(&I)) return SrcDIExpr; - - Type *Type = CI->getType(); - // Casts other than Trunc or SExt to scalar types cannot be salvaged. - if (Type->isVectorTy() || (!isa<TruncInst>(&I) && !isa<SExtInst>(&I))) - return nullptr; - - Value *FromValue = CI->getOperand(0); - unsigned FromTypeBitSize = FromValue->getType()->getScalarSizeInBits(); - - unsigned ToTypeBitSize = Type->getScalarSizeInBits(); - - // The result of the cast will be sign extended iff the instruction is a - // SExt; signedness is otherwise irrelevant on the expression stack. - unsigned Encoding = - isa<SExtInst>(&I) ? dwarf::DW_ATE_signed : dwarf::DW_ATE_unsigned; - - return applyOps({dwarf::DW_OP_LLVM_convert, FromTypeBitSize, Encoding, - dwarf::DW_OP_LLVM_convert, ToTypeBitSize, Encoding}); - } - - if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) { + return nullptr; + } else if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) { unsigned BitWidth = M.getDataLayout().getIndexSizeInBits(GEP->getPointerAddressSpace()); // Rewrite a constant GEP into a DIExpression. |