[llvm] [RISCV] Enable early if-conversion (PR #92959)
Pengcheng Wang via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 26 20:32:55 PDT 2024
================
@@ -203,3 +211,12 @@ unsigned RISCVSubtarget::getMinimumJumpTableEntries() const {
? RISCVMinimumJumpTableEntries
: TuneInfo->MinimumJumpTableEntries;
}
+
+bool RISCVSubtarget::enableEarlyIfConversion() const {
+ TargetSchedModel SchedModel;
+ SchedModel.init(this);
+ return RISCVForceEalyIfcvt ||
+ (!RISCVDisableEarlyIfcvt &&
+ (hasStdExtZicond() || hasVendorXVentanaCondOps()) &&
+ SchedModel.hasInstrSchedModelOrItineraries());
----------------
wangpc-pp wrote:
Do we really need `hasInstrSchedModelOrItineraries` here? We have an option to force early if-conversion, the schedule model is not really needed here.
https://github.com/llvm/llvm-project/pull/92959
More information about the llvm-commits
mailing list