Lines Matching refs:Rank
15 // In the implementation of this algorithm, constants are assigned rank = 0,
16 // function arguments are rank = 1, and other values are assigned ranks
18 // (starting at 2), which effectively gives values in deep loops higher rank
50 unsigned Rank;
52 ValueEntry(unsigned R, Value *O) : Rank(R), Op(O) {}
55 return LHS.Rank > RHS.Rank; // Sort so that highest rank goes to start.
69 dbgs() << ", #" << Ops[i].Rank << "] ";
174 return 0; // Otherwise it's a global or constant, rank 0.
177 if (unsigned Rank = ValueRankMap[I])
178 return Rank; // Rank already known?
180 // If this is an expression, return the 1+MAX(rank(LHS), rank(RHS)) so that
184 unsigned Rank = 0, MaxRank = RankMap[I->getParent()];
186 i != e && Rank != MaxRank; ++i)
187 Rank = std::max(Rank, getRank(I->getOperand(i)));
189 // If this is a not or neg instruction, do not count it for rank. This
190 // assures us that X and ~X will have the same rank.
193 ++Rank;
195 //DEBUG(dbgs() << "Calculated Rank[" << V->getName() << "] = "
196 // << Rank << "\n");
198 return ValueRankMap[I] = Rank;
266 /// rank of the non-tree operands.
297 // such, just remember these operands and their rank.
334 // Remember the RHS operand and its rank.
543 // Scan backwards and forwards among values with the same rank as element i to
545 // scanning for 'x' when we see '-x' because they both get the same rank.
548 unsigned XRank = Ops[i].Rank;
550 for (unsigned j = i+1; j != e && Ops[j].Rank == XRank; ++j)
554 for (unsigned j = i-1; j != ~0U && Ops[j].Rank == XRank; --j)
1044 // the operands and their ranks, sort the operands by their rank. Use a
1097 // Recalculate the rank map for F
1118 // We are done with the rank map.