[PATCH] D24818: Using branch probability to guide critical edge splitting.

Dehao Chen via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 11:32:30 PDT 2016


danielcdh added a comment.

oops, my original comment about t2 was unsubmitted...

I think the if-conversion leads to the loop rotation difference as observed by David?



> davidxl wrote in code-placement.ll:35
> The layout change in function 't2' is weird -- there are unnecessary branch back and forth introduced. Can you check why (not directly related to this patch -- but triggers some bugs).

For t2, there are originally 2 conditional jumps in level-1 loop. machine sink splitted one critical edge, making it able to be if-converted later (by machine if-converter). As a result, there is one less conditional jump in the level-1 loop, and thus the other conditional jump needs to become backedge, and thus need to have one unconditional branch from l-1 loop preheader to header.

https://reviews.llvm.org/D24818





More information about the llvm-commits mailing list