aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorStephen Tozer <Stephen.Tozer@Sony.com>2021-06-23 15:04:37 +0100
committerStephen Tozer <Stephen.Tozer@Sony.com>2021-06-24 13:16:29 +0100
commitadace79652174d126be290cab42b3122569fe15d (patch)
tree5e4676295a1715bc43000df2a1ef4d048f06a097 /llvm/lib/Transforms/Utils/Local.cpp
parent1113e06821e6baffc84b8caf96a28bf62e6d28dc (diff)
downloadllvm-adace79652174d126be290cab42b3122569fe15d.zip
llvm-adace79652174d126be290cab42b3122569fe15d.tar.gz
llvm-adace79652174d126be290cab42b3122569fe15d.tar.bz2
[DebugInfo] Enable variadic debug value salvaging
This patch enables the salvaging of debug values that may be calculated from more than one SSA value, such as with binary operators that do not use a constant argument. The actual functionality for this behaviour is added in a previous commit (c7270567), but with the ability to actually emit the resulting debug values switched off. The reason for this is that the prior patch has been reverted several times due to issues discovered downstream, some time after the actual landing of the patch. The patch in question is rather large and touches several widely used header files, and all issues discovered are more related to the handling of variadic debug values as a whole rather than the details of the patch itself. Therefore, to minimize the build time impact and risk of conflicts involved in any potential future revert/reapply of that patch, this significantly smaller patch (that touches no header files) will instead be used as the capstone to enable variadic debug value salvaging. The review linked to this patch is mostly implemented by the previous commit, c7270567, but also contains the changes in this patch. Differential Revision: https://reviews.llvm.org/D91722
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index cfbc24c..8af22af 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -1748,11 +1748,7 @@ void llvm::salvageDebugInfoForDbgValues(
} else if (isa<DbgValueInst>(DII) &&
DII->getNumVariableLocationOps() + AdditionalValues.size() <=
MaxDebugArgs) {
- // TODO: Uncomment the line below and delete the two beneath it to enable
- // salvaging of dbg.values with multiple location operands.
- // DII->addVariableLocationOps(AdditionalValues, SalvagedExpr);
- Value *Undef = UndefValue::get(I.getOperand(0)->getType());
- DII->replaceVariableLocationOp(I.getOperand(0), Undef);
+ DII->addVariableLocationOps(AdditionalValues, SalvagedExpr);
} else {
// Do not salvage using DIArgList for dbg.addr/dbg.declare, as it is
// currently only valid for stack value expressions.