aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-06-28 05:07:32 +0000
committerAndrew Trick <atrick@apple.com>2011-06-28 05:07:32 +0000
commit411daa5e8170bd0c3d3309e4ca01e42fb5a6e726 (patch)
treed00c72d9ce79918a5e69ff961de09df95170c985 /llvm/lib/Analysis/ScalarEvolutionExpander.cpp
parent60ab3efb3eb61eb346d5a672a9d5c55344191b60 (diff)
downloadllvm-411daa5e8170bd0c3d3309e4ca01e42fb5a6e726.zip
llvm-411daa5e8170bd0c3d3309e4ca01e42fb5a6e726.tar.gz
llvm-411daa5e8170bd0c3d3309e4ca01e42fb5a6e726.tar.bz2
SCEVExpander: give new insts a name that identifies the reponsible pass.
llvm-svn: 133992
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolutionExpander.cpp')
-rw-r--r--llvm/lib/Analysis/ScalarEvolutionExpander.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
index 0549935..b91d39b 100644
--- a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
+++ b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
@@ -936,7 +936,8 @@ SCEVExpander::getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized,
BasicBlock *Header = L->getHeader();
Builder.SetInsertPoint(Header, Header->begin());
pred_iterator HPB = pred_begin(Header), HPE = pred_end(Header);
- PHINode *PN = Builder.CreatePHI(ExpandTy, std::distance(HPB, HPE), "lsr.iv");
+ PHINode *PN = Builder.CreatePHI(ExpandTy, std::distance(HPB, HPE),
+ Twine(Label) + ".iv");
rememberInstruction(PN);
// Create the step instructions and populate the PHI.
@@ -972,8 +973,8 @@ SCEVExpander::getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized,
}
} else {
IncV = isNegative ?
- Builder.CreateSub(PN, StepV, "lsr.iv.next") :
- Builder.CreateAdd(PN, StepV, "lsr.iv.next");
+ Builder.CreateSub(PN, StepV, Twine(Label) + ".iv.next") :
+ Builder.CreateAdd(PN, StepV, Twine(Label) + ".iv.next");
rememberInstruction(IncV);
}
PN->addIncoming(IncV, Pred);