dominates(A, B) tries to determine dominance by walking an iterator from the beginning of the block potentially until the end. In extremely large BBs this can result in very long compile times, since this is called often from the artifact combiner.
The localizer's intra-block localization phase does a similar thing and walks through each instruction in the block top-down, checking if next instruction is the user set of the localizing instruction. Add a bailout threshold here too.
Longer term we may want to explore algorithmic changes to the code to alleviate these issues, perhaps by using lazy instruction numbering within blocks.
I arrived at these thresholds by building the test suite including SPEC2006, and choosing thresholds that were high enough that they wouldn't fire, going one order of magnitude higher.
This change looks concerning.
If this method returns false, it implies that A does not dominate B, and getDominatingInstrForID ends up moving the instruction to the current position. Is this what you're trying to do? (I suspect not).