summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorAnastasis Grammenos <anastasis.gramm2@gmail.com>2018-03-18 15:59:19 +0000
committerAnastasis Grammenos <anastasis.gramm2@gmail.com>2018-03-18 15:59:19 +0000
commit3a589103a4aa532d62c2c579e78e766e46f752c8 (patch)
treee9071ce1acf4ee77b8e94fb1388ae17fb92211e4 /llvm/lib/Transforms
parente6da3063a54c801eab5ff3ab267341a4804f9e4b (diff)
downloadbcm5719-llvm-3a589103a4aa532d62c2c579e78e766e46f752c8.tar.gz
bcm5719-llvm-3a589103a4aa532d62c2c579e78e766e46f752c8.zip
[LICM] Salvage DI from dying Instructions
LICM deletes trivially dead instructions which it won't attempt to sink. Attempt to salvage debug values which reference these instructions. llvm-svn: 327800
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LICM.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index e3df80b19aa..ea6d46cc81a 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -393,6 +393,7 @@ bool llvm::sinkRegion(DomTreeNode *N, AliasAnalysis *AA, LoopInfo *LI,
// used in the loop, instead, just delete it.
if (isInstructionTriviallyDead(&I, TLI)) {
DEBUG(dbgs() << "LICM deleting dead inst: " << I << '\n');
+ salvageDebugInfo(I);
++II;
CurAST->deleteValue(&I);
I.eraseFromParent();
OpenPOWER on IntegriCloud