On 01/22/15 12:01, Maxim Kuvyrkov wrote:
This happens when all 3 instructions have (1) same priority, and (2) only two of the three instructions are comparable on a "selective" heuristic. "Selective" means that a heuristic only applies to a subset of instructions, e.g., comparing speculative instructions among themselves (ia64), or comparing memory operations among themselves (what ached auto-prefetcher model does). Let's say that A and B are memory instructions and A < B as decided by autoprefetcher heuristic. C is not a memory instruction, and its rank resolved by comparing number of forward dependencies to those of A and B. Specifically, B has less forward dependencies than C, so B < C, but A has more forward dependencies than C, so C < A.
THanks. That really helps.
Code-quality-wise, this quirk of rank_for_schedule is harmless, since it occurs only for very similarly-ranked instructions. The problem appears only when length of ready_list changes (due to DEBUG_INSNs) as that can cause different pairs of instructions to be compared.
Right. I think I see how all the pieces fit together now... I want to ponder a bit, but this explanation really helps clarify things. jeff