[PATCH] D129599: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops
Alex Gatea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 25 06:29:33 PDT 2022
alexgatea reopened this revision.
alexgatea added a comment.
This revision is now accepted and ready to land.
I noticed significant performance degradation (~30%) on a spec benchmark due to this commit. isColdBlock doesn't seem to work as expected, because it considered cold a loop that was in a hot function through the profile.
For example, it could be the case that the loop in question is nested and is vectorizable after being unswitched, so not unswitching it can result in performance degradation if the surrounding function is hot.
void hotFunction(int M, int N, int * A, int *B, int *C){
for (j = 0; j < M; j++)
for (i=0; i < N; i++) {
A[i] = B[i] + C[i]
if (cond) do_something();
}
}
Could you please revert this commit while you work on replacing the isColdBlock check with something stronger?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129599/new/
https://reviews.llvm.org/D129599
More information about the llvm-commits
mailing list