SCEVExpander: give new insts a name that identifies the reponsible pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133992 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Trick
2011-06-28 05:07:32 +00:00
parent a5d950f673
commit 5e7645be4c
5 changed files with 14 additions and 9 deletions

View File

@@ -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);