[PATCH] D43256: [MBP] Move a latch block with conditional exit and multi predecessors to top of loop
Gal Zohar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 12 23:55:15 PST 2021
GalZohar added a comment.
In D43256#2494925 <https://reviews.llvm.org/D43256#2494925>, @Carrot wrote:
> @GalZohar, thanks for the example, now I understand your problem. The new layout does increase the number of executed branches for the path BB2->BB3->BB4->BB2. Unfortunately most of the current MBP algorithms don't consider this factor. When considering the number of fall through only, the new layout has more fall through and less taken branch.
>
> Since the number of executed branches does has performance impact on your target, so welcome to enhance MBP to include this factor on related targets.
Is this a general problem with MBP then? I haven't noticed it before this optimization, but maybe it was just luck or not investigating the right examples. I'm trying to understand where is the best place to fix it, and if it's even feasible.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D43256/new/
https://reviews.llvm.org/D43256
More information about the llvm-commits
mailing list