Home | History | Annotate | Download | only in Scalar

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
52 unsigned Rank;
54 ValueEntry(unsigned R, Value *O) : Rank(R), Op(O) {}
57 return LHS.Rank > RHS.Rank; // Sort so that highest rank goes to start.
71 dbgs() << ", #" << Ops[i].Rank << "] ";
136 // Sort the XorOpnd-Pointer in ascending order of symbolic-value-rank.
139 // 2) Operand having smaller symbolic-value-rank is permuted earlier, which
141 // Note that values' rank are basically defined in RPO order (FIXME).
142 // So, if Rank(X) < Rank(Y) < Rank(Z), it means X is defined earlier
285 DEBUG(dbgs() << "Calculated Rank[" << I->getName() << "] = " << i << "\n");
307 return 0; // Otherwise it's a global or constant, rank 0.
310 if (unsigned Rank = ValueRankMap[I])
311 return Rank; // Rank already known?
313 // If this is an expression, return the 1+MAX(rank(LHS), rank(RHS)) so that
317 unsigned Rank = 0, MaxRank = RankMap[I->getParent()];
319 i != e && Rank != MaxRank; ++i)
320 Rank = std::max(Rank, getRank(I->getOperand(i)));
322 // If this is a not or neg instruction, do not count it for rank. This
323 // assures us that X and ~X will have the same rank.
326 ++Rank;
328 DEBUG(dbgs() << "Calculated Rank[" << V->getName() << "] = " << Rank << "\n");
330 return ValueRankMap[I] = Rank;
333 // Canonicalize constants to RHS. Otherwise, sort the operands by rank.
1070 /// rank as element i to see if X exists. If X does not exist, return i. This
1072 /// same rank.
1075 unsigned XRank = Ops[i].Rank;
1077 for (unsigned j = i+1; j != e && Ops[j].Rank == XRank; ++j) {
1086 for (unsigned j = i-1; j != ~0U && Ops[j].Rank == XRank; --j) {
2187 // the operands and their ranks, sort the operands by their rank. Use a
2257 // Calculate the rank map for F
2282 // We are done with the rank map.