This is similar to Chandler's r231238 (most details on that commit log).
The difference is that Chandler's version led to putting outlined blocks in reverse order, which does seem to have a quite dramatic performance overhead.
In contrast, this version only picks the back of the worklist, if the previously placed machine block had a successor that wasn't placed for other reasons, especially:
- It was cold.
- It had a globally more important predecessor.
Using the back of the worklist in those circumstances keeps outlined branches together. Once an outlined branch was placed completely, there simply won't be any more successors and it is more useful to start with the hottest block from the entire worklist (and the first one for equal probabilities).