aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@chromium.org>2021-06-08 14:42:11 +0200
committerHans Wennborg <hans@chromium.org>2021-06-08 14:54:08 +0200
commit386b66b2fc297cda121a3cc8a36887a6ecbcfc68 (patch)
tree0e2b5c2ad63ca0f754de4cf6de510d066847c666 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parent41eb2cec47986d8128c0ef03164a007b0db67127 (diff)
downloadllvm-386b66b2fc297cda121a3cc8a36887a6ecbcfc68.zip
llvm-386b66b2fc297cda121a3cc8a36887a6ecbcfc68.tar.gz
llvm-386b66b2fc297cda121a3cc8a36887a6ecbcfc68.tar.bz2
Revert "3rd Reapply "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands""
> This reapplies c0f3dfb9, which was reverted following the discovery of > crashes on linux kernel and chromium builds - these issues have since > been fixed, allowing this patch to re-land. This reverts commit 36ec97f76ac0d8be76fb16ac521f55126766267d. The change caused non-determinism in the compiler, see comments on the code review at https://reviews.llvm.org/D91722. Reverting to unbreak people's builds until that can be addressed. This also reverts the follow-up "[DebugInfo] Limit the number of values that may be referenced by a dbg.value" in a0bd6105d80698c53ceaa64bbe6e3b7e7bbf99ee.
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 01b0627..696a28a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -1248,10 +1248,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);
@@ -1275,21 +1271,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.