This patch adds the base heuristics for determining whether branches are more profitable than conditional moves.
Base heuristics apply to all code apart from inner-most loops.
Depends on D122259
Paths
| Differential D120231
[SelectOpti][3/5] Base Heuristics ClosedPublic Authored by apostolakis on Feb 20 2022, 10:44 PM.
Details
Summary This patch adds the base heuristics for determining whether branches are more profitable than conditional moves. Depends on D122259
Diff Detail
Event Timelineapostolakis added a child revision: D120232: [SelectOpti][4/5] Loop Heuristics.Feb 20 2022, 10:49 PM apostolakis retitled this revision from [SelectOpti][2/4] Base Heuristics to [SelectOpti][3/5] Base Heuristics.Mar 22 2022, 2:04 PM apostolakis added a parent revision: D122259: [SelectOpti][2/5] Select-to-branch base transformation. davidxl added inline comments.
apostolakis added inline comments.
This revision is now accepted and ready to land.Apr 18 2022, 10:30 PM
Comment Actions Limit the isPredictableSelectExpensive check to only the highly-predictable heuristic. apostolakis removed a parent revision: D120230: [SelectOpti][1/5] Setup new select-optimize pass.May 14 2022, 2:05 PM This revision was landed with ongoing or failed builds.May 23 2022, 7:02 PM Closed by commit rG8b42bc5662ca: [SelectOpti][3/5] Base Heuristics (authored by apostolakis). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 417838 llvm/lib/CodeGen/SelectOptimize.cpp
llvm/test/CodeGen/X86/select-optimize.ll
|
add some comments to the methods.