From 334fa5745653b23246a1e4309e30b274644601f2 Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Fri, 2 Mar 2018 21:36:35 +0000 Subject: [Utils] Salvage debug info in recursive inst deletion In stage2 -O3 builds of llc, this results in a 0.3% increase in the number of variables with locations, and a 0.2% increase in the number of unique source variables overall. The size of the .debug_loc section of the llc dsym increases by 0.5%. llvm-svn: 326621 --- llvm/lib/Transforms/Utils/Local.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/Transforms/Utils/Local.cpp') diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index fa059a11295..1fd85a83e0a 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -431,6 +431,7 @@ llvm::RecursivelyDeleteTriviallyDeadInstructions(Value *V, do { I = DeadInsts.pop_back_val(); + salvageDebugInfo(*I); // Null out all of the instruction's operands to see if any operand becomes // dead as we go. -- cgit v1.2.3