[llvm-commits] [llvm] r130894 - /llvm/trunk/lib/Transforms/Utils/LCSSA.cpp
Devang Patel
dpatel at apple.com
Wed May 4 16:58:22 PDT 2011
Author: dpatel
Date: Wed May 4 18:58:22 2011
New Revision: 130894
URL: http://llvm.org/viewvc/llvm-project?rev=130894&view=rev
Log:
Set debug location for new PHI nodes created in exit block.
Modified:
llvm/trunk/lib/Transforms/Utils/LCSSA.cpp
Modified: llvm/trunk/lib/Transforms/Utils/LCSSA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LCSSA.cpp?rev=130894&r1=130893&r2=130894&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LCSSA.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LCSSA.cpp Wed May 4 18:58:22 2011
@@ -36,6 +36,7 @@
#include "llvm/Analysis/Dominators.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Analysis/ScalarEvolution.h"
+#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/SSAUpdater.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/STLExtras.h"
@@ -226,6 +227,7 @@
PredCache.GetNumPreds(ExitBB),
Inst->getName()+".lcssa",
ExitBB->begin());
+ PN->setDebugLoc(GetFirstDebugLocInBasicBlock(ExitBB));
// Add inputs from inside the loop for this PHI.
for (BasicBlock **PI = PredCache.GetPreds(ExitBB); *PI; ++PI) {
More information about the llvm-commits
mailing list