diff options
| author | Petar Jovanovic <petar.jovanovic@mips.com> | 2018-01-09 15:08:37 +0000 |
|---|---|---|
| committer | Petar Jovanovic <petar.jovanovic@mips.com> | 2018-01-09 15:08:37 +0000 |
| commit | 1d26c7e4ff8bb9af770eaffda09cb0aa90164a4a (patch) | |
| tree | 060ef2c2c1e0c80f777c4226a32fb523220f4abb /llvm/lib/Transforms | |
| parent | bb3c2432fa6e9dce01c1d609de48b72a0356b2d3 (diff) | |
| download | bcm5719-llvm-1d26c7e4ff8bb9af770eaffda09cb0aa90164a4a.tar.gz bcm5719-llvm-1d26c7e4ff8bb9af770eaffda09cb0aa90164a4a.zip | |
[EarlyCSE] Salvage debug info during DCE
EarlyCSE did not try to salvage debug info during erasing of instructions.
This change fixes it.
Patch by Djordje Todorovic.
Differential Revision: https://reviews.llvm.org/D41496
llvm-svn: 322083
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/EarlyCSE.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp index 5798e1c4ee9..342a6d08fa5 100644 --- a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp +++ b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp @@ -717,6 +717,7 @@ bool EarlyCSE::processNode(DomTreeNode *Node) { // Dead instructions should just be removed. if (isInstructionTriviallyDead(Inst, &TLI)) { DEBUG(dbgs() << "EarlyCSE DCE: " << *Inst << '\n'); + salvageDebugInfo(*Inst); removeMSSA(Inst); Inst->eraseFromParent(); Changed = true; |

