[PATCH] D71883: [PowerPC] Use PredictableSelectIsExpensive to enable select to branch in CGP
Zhang Kang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 22:43:58 PST 2020
ZhangKang marked 5 inline comments as done.
ZhangKang added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPC.td:288
+ FeatureISA3_0,
+ FeaturePredictableSelectIsExpensive
+ ];
----------------
nemanjai wrote:
> This should certainly be set for Power8 as well.
I haven't do the performance for the Power8, so I only enable it for Power9.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1261
+ // Select is more expensive than a branch if the feature
+ // FeaturePredictableSelectIsExpensive has been set.
+ PredictableSelectIsExpensive = Subtarget.isPredictableSelectIsExpensive();
----------------
nemanjai wrote:
> I think that having the same name `PredictableSelectIsExpensive` as members of both the TLI and the Subtarget is a bit confusing. At the very least, the comment should be a bit more descriptive. Perhaps:
> ```
> // Let the subtarget (CPU) decide if a predictable select is more
> // expensive than the corresponding branch. This information is used
> // in CGP to decide when to convert selects into branches.
> ```
Have modified the comments.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71883/new/
https://reviews.llvm.org/D71883
More information about the llvm-commits
mailing list