diff options
author | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-07-31 14:54:52 +0000 |
---|---|---|
committer | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-07-31 14:54:52 +0000 |
commit | ac3f8028da6881ff180381fd2a5033a0560dc1cf (patch) | |
tree | 364dcad7366e29b7e19c1ff892da0a93af11aa80 /llvm/lib/Transforms/Utils | |
parent | cbc58ada99c2d0f9a0cf8e23354d663f05c40f75 (diff) | |
download | bcm5719-llvm-ac3f8028da6881ff180381fd2a5033a0560dc1cf.tar.gz bcm5719-llvm-ac3f8028da6881ff180381fd2a5033a0560dc1cf.zip |
[DebugInfo][LCSSA] Preserve debug location in lcssa phis
Summary:
When inserting lcssa Phi Nodes in the exit block
mak sure to preserve the original instructions DL.
Reviewers: vsk
Subscribers: JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D50009
llvm-svn: 338391
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r-- | llvm/lib/Transforms/Utils/LCSSA.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LCSSA.cpp b/llvm/lib/Transforms/Utils/LCSSA.cpp index 31834afa2b3..a1f8e7484bc 100644 --- a/llvm/lib/Transforms/Utils/LCSSA.cpp +++ b/llvm/lib/Transforms/Utils/LCSSA.cpp @@ -144,7 +144,8 @@ bool llvm::formLCSSAForInstructions(SmallVectorImpl<Instruction *> &Worklist, PHINode *PN = PHINode::Create(I->getType(), PredCache.size(ExitBB), I->getName() + ".lcssa", &ExitBB->front()); - + // Get the debug location from the original instruction. + PN->setDebugLoc(I->getDebugLoc()); // Add inputs from inside the loop for this PHI. for (BasicBlock *Pred : PredCache.get(ExitBB)) { PN->addIncoming(I, Pred); |