[all-commits] [llvm/llvm-project] b92c8c: [NewPM] Disable non-trivial loop-unswitch on targe...
Sameer Sahasrabuddhe via All-commits
all-commits at lists.llvm.org
Thu Mar 25 04:28:55 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b92c8c22b924969fe6cbe1b9faf874333d4eafd0
https://github.com/llvm/llvm-project/commit/b92c8c22b924969fe6cbe1b9faf874333d4eafd0
Author: Sameer Sahasrabuddhe <sameer.sahasrabuddhe at amd.com>
Date: 2021-03-25 (Thu, 25 Mar 2021)
Changed paths:
M llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
M llvm/test/Transforms/LoopUnswitch/AMDGPU/divergent-unswitch.ll
A llvm/test/Transforms/LoopUnswitch/AMDGPU/uniform-unswitch.ll
Log Message:
-----------
[NewPM] Disable non-trivial loop-unswitch on targets with divergence
Unswitching a loop on a non-trivial divergent branch is expensive
since it serializes the execution of both version of the
loop. But identifying a divergent branch needs divergence analysis,
which is a function level analysis.
The legacy pass manager handles this dependency by isolating such a
loop transform and rerunning the required function analyses. This
functionality is currently missing in the new pass manager, and there
is no safe way for the SimpleLoopUnswitch pass to depend on
DivergenceAnalysis. So we conservatively assume that all non-trivial
branches are divergent if the target has divergence.
Reviewed By: tra
Differential Revision: https://reviews.llvm.org/D98958
More information about the All-commits
mailing list