[PATCH] D129817: [SelectOpti] Auto-disable other cmov optis when the new select-opti pass is enabled
Sotiris Apostolakis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 1 14:02:34 PDT 2022
apostolakis added inline comments.
================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:6719
+ // If the SelectOptimize pass is enabled, selects have already been optimized.
+ if (!getCGPassBuilderOption().DisableSelectOptimize)
+ return false;
----------------
davidxl wrote:
> select optimization also depends on other conditions such as PGO etc for now. Should we check if it is actually enabled?
The optimization is indeed much more effective with PGO since most of its heuristics rely on profile information. Yet, there is still some benefit for non-PGO builds, especially for AArch64. In fact, we have seen significant improvements (up to 3x speedups) for non-PGO builds for some ARM microbenchmarks. Some heuristics are only enabled for PGO builds while other ones such as the loop-level analysis improve their cost modeling with profile information but are still operational with conservative assumptions for weights for non-PGO builds. Therefore, I would avoid excluding any build (including non-PGO ones) from enabling the optimization.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129817/new/
https://reviews.llvm.org/D129817
More information about the llvm-commits
mailing list