[PATCH] D143162: [AArch64] Add PredictableSelectIsExpensive feature for the Neoverse V1

Aleksandr Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 02:50:45 PST 2023


aleksandr.popov created this revision.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
aleksandr.popov requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

In the revision https://reviews.llvm.org/D138990 was enabled select
optimize pass for AArch64.

We were doing some benchmarking on the Neoverse V1 and were
experimenting with select optimize heuristics. We found out that there
are some additional profitable transformations to predictable branches
(with prediction rate > 75% according to Agner Fog's rule of thumb) can
be done by base heuristic from SelectOptimize pass or by
optimizeSelectInst form CodeGenPrepare pass. But they are blocked on the
Neoverse V1, since PredictableSelectIsExpensive feature is not set for
that subtarget.

Make be it make sence to add this feature to all targets where was
enabled select optimize pass in the https://reviews.llvm.org/D138990.
But currently I have results for Neoverse V1 only.


https://reviews.llvm.org/D143162

Files:
  llvm/lib/Target/AArch64/AArch64.td


Index: llvm/lib/Target/AArch64/AArch64.td
===================================================================
--- llvm/lib/Target/AArch64/AArch64.td
+++ llvm/lib/Target/AArch64/AArch64.td
@@ -1092,7 +1092,8 @@
                                       FeatureFuseAdrpAdd,
                                       FeatureLSLFast,
                                       FeaturePostRAScheduler,
-                                      FeatureEnableSelectOptimize]>;
+                                      FeatureEnableSelectOptimize,
+                                      FeaturePredictableSelectIsExpensive]>;
 
 def TuneNeoverseV2 : SubtargetFeature<"neoversev2", "ARMProcFamily", "NeoverseV2",
                                       "Neoverse V2 ARM processors", [


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143162.494227.patch
Type: text/x-patch
Size: 760 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230202/edbcc475/attachment.bin>


More information about the llvm-commits mailing list