Skip to content
Snippets Groups Projects
Commit ac794d46 authored by Devang Patel's avatar Devang Patel
Browse files

Set debug location for new PHI nodes created in exit block.

llvm-svn: 130894
parent 17d4f9bb
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "llvm/Analysis/Dominators.h" #include "llvm/Analysis/Dominators.h"
#include "llvm/Analysis/LoopPass.h" #include "llvm/Analysis/LoopPass.h"
#include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/SSAUpdater.h" #include "llvm/Transforms/Utils/SSAUpdater.h"
#include "llvm/ADT/Statistic.h" #include "llvm/ADT/Statistic.h"
#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/STLExtras.h"
...@@ -226,6 +227,7 @@ bool LCSSA::ProcessInstruction(Instruction *Inst, ...@@ -226,6 +227,7 @@ bool LCSSA::ProcessInstruction(Instruction *Inst,
PredCache.GetNumPreds(ExitBB), PredCache.GetNumPreds(ExitBB),
Inst->getName()+".lcssa", Inst->getName()+".lcssa",
ExitBB->begin()); ExitBB->begin());
PN->setDebugLoc(GetFirstDebugLocInBasicBlock(ExitBB));
// Add inputs from inside the loop for this PHI. // Add inputs from inside the loop for this PHI.
for (BasicBlock **PI = PredCache.GetPreds(ExitBB); *PI; ++PI) { for (BasicBlock **PI = PredCache.GetPreds(ExitBB); *PI; ++PI) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment