[PATCH] D147078: [LICM][BPF] Disable hoistMinMax() optimization for BPF target
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 5 03:51:18 PDT 2023
mkazantsev added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LICM.cpp:995
// expression out of the loop.
- if (hoistMinMax(I, *CurLoop, *SafetyInfo, MSSAU)) {
+ if (EnableMinMaxHoisting && hoistMinMax(I, *CurLoop, *SafetyInfo, MSSAU)) {
++NumMinMaxHoisted;
----------------
mkazantsev wrote:
> Might as well in `hoistMinMax` do
> ```
> if (!EnableMinMaxHoisting)
> return false;
> ```
> It's more reliable in case if someone else wants to use it in another place.
I meant doing this inside `hoistMinMax`, so that it works for all its callers.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147078/new/
https://reviews.llvm.org/D147078
More information about the llvm-commits
mailing list