This is an archive of the discontinued LLVM Phabricator instance.

[SelectOpti] Auto-disable other cmov optis when the new select-opti pass is enabled
ClosedPublic

Authored by apostolakis on Jul 14 2022, 4:17 PM.

Diff Detail

Event Timeline

apostolakis created this revision.Jul 14 2022, 4:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2022, 4:17 PM
apostolakis published this revision for review.Jul 14 2022, 4:20 PM
apostolakis retitled this revision from [SelectOpti] Auto-disable other cmov optis when the select-opti pass is enabled to [SelectOpti] Auto-disable other cmov optis when the new select-opti pass is enabled.
apostolakis added a reviewer: davidxl.
Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2022, 4:21 PM
davidxl added inline comments.Aug 1 2022, 12:45 PM
llvm/lib/CodeGen/CodeGenPrepare.cpp
6719

select optimization also depends on other conditions such as PGO etc for now. Should we check if it is actually enabled?

apostolakis added inline comments.Aug 1 2022, 2:02 PM
llvm/lib/CodeGen/CodeGenPrepare.cpp
6719

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.

davidxl accepted this revision.Aug 1 2022, 2:05 PM

lgtm

This revision is now accepted and ready to land.Aug 1 2022, 2:05 PM
This revision was landed with ongoing or failed builds.Aug 1 2022, 5:27 PM
This revision was automatically updated to reflect the committed changes.