-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements to loop hoisting (#71504)
* Improvements to loop hoisting - optHoistLoopNest(): (1) no need to check if a pre-header has already been added; pre-headers are unique to a loop if they exist. (2) simplify the "append to list" code. - optHoistThisLoop(): (1) allow adding multiple pre-headers after every "IDom" addition, if there are any in the right order. (2) Simplify addition of remaining pre-headers. - optLoopEntry(): technically, you shouldn't look at `bbJumpDest` unless you know the branch kind is one that sets it. So change the condition. Also, fix the output of why something wasn't hoisted. The concept of "hoistable" implies "invariant" (but not the reverse). So print the least specific failure reason. These were backwards before. For instance, if we couldn't hoist a top node, but it was invariant, we would, oddly, print "not invariant" instead of "not hoistable". In the case where it isn't hoistable, and also isn't invariant, it makes more sense to print "not invariant", which also implies "not hoistable". Add dumping the OpName for the Pre/PostOrderVisit output, to help avoid cross-referencing the node number all the time. No asm diffs. * Feedback
- Loading branch information
1 parent
9b10634
commit f28904a
Showing
1 changed file
with
51 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters