[PATCH] D62079: [MBP] Rotate should bring more fallthrough
Guozhi Wei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 21 08:28:52 PDT 2019
Carrot added a comment.
Precisely compute the fallthrough frequency is very helpful in layout of loop header and exit BB. It is included in my next patch.
Current implementation of findBestLoopExit finds the exit edge with most frequency, and rotateLoop exposes that edge as fallthrough. This patch fixed a problem in a very common case
- The loop header has only one out-of-loop predecessor
- The bottom of the loop chain doesn't exit the loop
In this case, the exit edge can't have larger frequency than the fallthrough to header, so the loop chain should not be rotated.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62079/new/
https://reviews.llvm.org/D62079
More information about the llvm-commits
mailing list