mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
[Reassociate] Improve rank debug information. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221999 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
239d5231f3
commit
1945dcff86
@ -278,9 +278,11 @@ static bool isUnmovableInstruction(Instruction *I) {
|
||||
void Reassociate::BuildRankMap(Function &F) {
|
||||
unsigned i = 2;
|
||||
|
||||
// Assign distinct ranks to function arguments
|
||||
for (Function::arg_iterator I = F.arg_begin(), E = F.arg_end(); I != E; ++I)
|
||||
// Assign distinct ranks to function arguments.
|
||||
for (Function::arg_iterator I = F.arg_begin(), E = F.arg_end(); I != E; ++I) {
|
||||
ValueRankMap[&*I] = ++i;
|
||||
DEBUG(dbgs() << "Calculated Rank[" << I->getName() << "] = " << i << "\n");
|
||||
}
|
||||
|
||||
ReversePostOrderTraversal<Function*> RPOT(&F);
|
||||
for (ReversePostOrderTraversal<Function*>::rpo_iterator I = RPOT.begin(),
|
||||
@ -324,8 +326,7 @@ unsigned Reassociate::getRank(Value *V) {
|
||||
!BinaryOperator::isFNeg(I)))
|
||||
++Rank;
|
||||
|
||||
//DEBUG(dbgs() << "Calculated Rank[" << V->getName() << "] = "
|
||||
// << Rank << "\n");
|
||||
DEBUG(dbgs() << "Calculated Rank[" << V->getName() << "] = " << Rank << "\n");
|
||||
|
||||
return ValueRankMap[I] = Rank;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user