summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-02-21 01:55:33 +0000
committerVedant Kumar <vsk@apple.com>2018-02-21 01:55:33 +0000
commit56492f9177e57b383d54366f93d77595ee80fd78 (patch)
treeefa63aa7f77e5adcd08f86f2f3982b8df48b188f /llvm/lib/Transforms/Scalar
parent9fbf64139ed74e23dcb51a4d42b270563cd89858 (diff)
downloadbcm5719-llvm-56492f9177e57b383d54366f93d77595ee80fd78.tar.gz
bcm5719-llvm-56492f9177e57b383d54366f93d77595ee80fd78.zip
[BDCE] Salvage debug info from dying insts
This results in 15 additional unique source variables in a stage2 build of FileCheck (at '-Os -g'), with a negligible increase in the size of the .debug_loc section. llvm-svn: 325660
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/BDCE.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/BDCE.cpp b/llvm/lib/Transforms/Scalar/BDCE.cpp
index 851efa000f6..8a6f7978ad3 100644
--- a/llvm/lib/Transforms/Scalar/BDCE.cpp
+++ b/llvm/lib/Transforms/Scalar/BDCE.cpp
@@ -26,6 +26,7 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Scalar.h"
+#include "llvm/Transforms/Utils/Local.h"
using namespace llvm;
#define DEBUG_TYPE "bdce"
@@ -114,6 +115,7 @@ static bool bitTrackingDCE(Function &F, DemandedBits &DB) {
if (!DB.isInstructionDead(&I))
continue;
+ salvageDebugInfo(I);
Worklist.push_back(&I);
I.dropAllReferences();
Changed = true;
OpenPOWER on IntegriCloud