[all-commits] [llvm/llvm-project] aa4853: [LICM] Do not hoist widenable conditions
Max Kazantsev via All-commits
all-commits at lists.llvm.org
Sun Mar 19 22:29:35 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: aa485384d7819406fc03629d4505a28a02dabd07
https://github.com/llvm/llvm-project/commit/aa485384d7819406fc03629d4505a28a02dabd07
Author: Max Kazantsev <mkazantsev at azul.com>
Date: 2023-03-20 (Mon, 20 Mar 2023)
Changed paths:
M llvm/lib/Transforms/Scalar/LICM.cpp
M llvm/test/Transforms/GuardWidening/two_forms_behavior_consistency.ll
M llvm/test/Transforms/LICM/explicit_guards.ll
Log Message:
-----------
[LICM] Do not hoist widenable conditions
Despite the fact that it is legal, it is not profitable. It may prevent
Loop Guard Widening to happen. Because of bug described at
https://github.com/llvm/llvm-project/issues/60234, now the guard widening is
only possible when condtion we want to add is available at the point of the
widenable_condition() of dominating guard. It means that, if all such calls are
hoisted out of loop, and the loop conditions depend on loop-variants, we cannot
widen. Hoisting is otherwise not helpful, because it does not introduce any
optimization opportunities.
Differential Revision: https://reviews.llvm.org/D146274
Reviewed By: apilipenko
More information about the All-commits
mailing list