aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2021-04-30 20:23:21 -0700
committerNathan Chancellor <nathan@kernel.org>2021-04-30 20:23:21 -0700
commit4397b7095d640f9b9426c4d0135e999c5a1de1c5 (patch)
treef2bda9d4093302085c8e744c73ebe5fddeb9362e /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parent6946f0ecca64f3af6b9e28cced9c982de2748f19 (diff)
downloadllvm-4397b7095d640f9b9426c4d0135e999c5a1de1c5.zip
llvm-4397b7095d640f9b9426c4d0135e999c5a1de1c5.tar.gz
llvm-4397b7095d640f9b9426c4d0135e999c5a1de1c5.tar.bz2
Revert "Re-reapply "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands""
This reverts commit 791930d74087b8ae8901172861a0fd21a211e436, as per https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy. I observed breakage with the Linux kernel, as reported at https://reviews.llvm.org/D91722#2724321 Fixes exist at https://reviews.llvm.org/D101523 https://reviews.llvm.org/D101540 but they have not landed so to unbreak the tree for the weekend, revert this commit. Commit b11e4c990771 ("Revert "[DebugInfo] Drop DBG_VALUE_LISTs with an excessive number of debug operands"") only reverted one follow-up fix, not the original patch that broke the kernel. e
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 22aa27f..c226dc3 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -1238,10 +1238,6 @@ void SelectionDAGBuilder::resolveDanglingDebugInfo(const Value *V,
}
void SelectionDAGBuilder::salvageUnresolvedDbgValue(DanglingDebugInfo &DDI) {
- // TODO: For the variadic implementation, instead of only checking the fail
- // state of `handleDebugValue`, we need know specifically which values were
- // invalid, so that we attempt to salvage only those values when processing
- // a DIArgList.
assert(!DDI.getDI()->hasArgList() &&
"Not implemented for variadic dbg_values");
Value *V = DDI.getDI()->getValue(0);
@@ -1265,21 +1261,16 @@ void SelectionDAGBuilder::salvageUnresolvedDbgValue(DanglingDebugInfo &DDI) {
while (isa<Instruction>(V)) {
Instruction &VAsInst = *cast<Instruction>(V);
// Temporary "0", awaiting real implementation.
- SmallVector<Value *, 4> AdditionalValues;
- DIExpression *SalvagedExpr =
- salvageDebugInfoImpl(VAsInst, Expr, StackValue, 0, AdditionalValues);
+ DIExpression *NewExpr = salvageDebugInfoImpl(VAsInst, Expr, StackValue, 0);
// If we cannot salvage any further, and haven't yet found a suitable debug
// expression, bail out.
- // TODO: If AdditionalValues isn't empty, then the salvage can only be
- // represented with a DBG_VALUE_LIST, so we give up. When we have support
- // here for variadic dbg_values, remove that condition.
- if (!SalvagedExpr || !AdditionalValues.empty())
+ if (!NewExpr)
break;
// New value and expr now represent this debuginfo.
V = VAsInst.getOperand(0);
- Expr = SalvagedExpr;
+ Expr = NewExpr;
// Some kind of simplification occurred: check whether the operand of the
// salvaged debug expression can be encoded in this DAG.