Skip to content

Commit ac794d4

Browse files
author
Devang Patel
committed
Set debug location for new PHI nodes created in exit block.
llvm-svn: 130894
1 parent 17d4f9b commit ac794d4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Transforms/Utils/LCSSA.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "llvm/Analysis/Dominators.h"
3737
#include "llvm/Analysis/LoopPass.h"
3838
#include "llvm/Analysis/ScalarEvolution.h"
39+
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
3940
#include "llvm/Transforms/Utils/SSAUpdater.h"
4041
#include "llvm/ADT/Statistic.h"
4142
#include "llvm/ADT/STLExtras.h"
@@ -226,6 +227,7 @@ bool LCSSA::ProcessInstruction(Instruction *Inst,
226227
PredCache.GetNumPreds(ExitBB),
227228
Inst->getName()+".lcssa",
228229
ExitBB->begin());
230+
PN->setDebugLoc(GetFirstDebugLocInBasicBlock(ExitBB));
229231

230232
// Add inputs from inside the loop for this PHI.
231233
for (BasicBlock **PI = PredCache.GetPreds(ExitBB); *PI; ++PI) {

0 commit comments

Comments
 (0)