[llvm] 47633af - Reapply "[DebugInfo] Enable variadic debug value salvaging"

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 15 04:55:15 PDT 2021


Author: Stephen Tozer
Date: 2021-07-15T12:54:51+01:00
New Revision: 47633af9d4a8b93f50cb711cf23489736e0226f1

URL: https://github.com/llvm/llvm-project/commit/47633af9d4a8b93f50cb711cf23489736e0226f1
DIFF: https://github.com/llvm/llvm-project/commit/47633af9d4a8b93f50cb711cf23489736e0226f1.diff

LOG: Reapply "[DebugInfo] Enable variadic debug value salvaging"

Reapplied after previous build failures were fixed in 14b62f7e2.

This reverts commit 540b4a5fb31086b6d40735e96e6ec497022107e7.

Added: 
    

Modified: 
    llvm/lib/Transforms/Utils/Local.cpp
    llvm/test/DebugInfo/salvage-duplicate-values.ll
    llvm/test/DebugInfo/salvage-gep.ll
    llvm/test/DebugInfo/salvage-nonconst-binop.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 86d1ea8ca8f0..d5e301bf5caf 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -1761,11 +1761,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.

diff  --git a/llvm/test/DebugInfo/salvage-duplicate-values.ll b/llvm/test/DebugInfo/salvage-duplicate-values.ll
index 116af46aef5d..1b5366c626bf 100644
--- a/llvm/test/DebugInfo/salvage-duplicate-values.ll
+++ b/llvm/test/DebugInfo/salvage-duplicate-values.ll
@@ -1,4 +1,3 @@
-; XFAIL: *
 ; RUN: opt %s -dce -S | FileCheck %s
 
 ; Tests the results of salvaging variadic dbg.values that use the same SSA value

diff  --git a/llvm/test/DebugInfo/salvage-gep.ll b/llvm/test/DebugInfo/salvage-gep.ll
index dfb3b5311083..6c31b0ff61de 100644
--- a/llvm/test/DebugInfo/salvage-gep.ll
+++ b/llvm/test/DebugInfo/salvage-gep.ll
@@ -1,4 +1,3 @@
-; XFAIL: *
 ; RUN: opt %s -dce -S | FileCheck %s
 
 ; Tests the salvaging of GEP instructions, specifically struct indexing and

diff  --git a/llvm/test/DebugInfo/salvage-nonconst-binop.ll b/llvm/test/DebugInfo/salvage-nonconst-binop.ll
index f9ee1a6e253c..b470bc1ad2a9 100644
--- a/llvm/test/DebugInfo/salvage-nonconst-binop.ll
+++ b/llvm/test/DebugInfo/salvage-nonconst-binop.ll
@@ -1,4 +1,3 @@
-; XFAIL: *
 ; RUN: opt %s -dce -S | FileCheck %s
 
 ; Tests the salvaging of binary operators that use more than one non-constant


        


More information about the llvm-commits mailing list