summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-03-02 21:36:35 +0000
committerVedant Kumar <vsk@apple.com>2018-03-02 21:36:35 +0000
commit334fa5745653b23246a1e4309e30b274644601f2 (patch)
treed8b15dd0da0b120481e7a58a82db2fcc1ff4b083 /llvm/lib/Transforms/Utils/Local.cpp
parent1425e04146b7f825f0a5808acd52c8ec6117ec04 (diff)
downloadbcm5719-llvm-334fa5745653b23246a1e4309e30b274644601f2.tar.gz
bcm5719-llvm-334fa5745653b23246a1e4309e30b274644601f2.zip
[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
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp1
1 files changed, 1 insertions, 0 deletions
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.
OpenPOWER on IntegriCloud