File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,11 @@ static cl::opt<bool>
114
114
cl::desc (" Enable Machine Pipeliner for RISC-V" ),
115
115
cl::init(false ), cl::Hidden);
116
116
117
+ static cl::opt<bool > EnableEVLIndVarSimplify (
118
+ " riscv-simplify-evl-iv" ,
119
+ cl::desc (" Enable the EVLIndVarSimplify pass." ), cl::init(false ),
120
+ cl::Hidden);
121
+
117
122
extern " C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTarget () {
118
123
RegisterTargetMachine<RISCVTargetMachine> X (getTheRISCV32Target ());
119
124
RegisterTargetMachine<RISCVTargetMachine> Y (getTheRISCV64Target ());
@@ -645,7 +650,7 @@ void RISCVTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) {
645
650
646
651
PB.registerVectorizerEndEPCallback (
647
652
[](FunctionPassManager &FPM, OptimizationLevel Level) {
648
- if (Level.isOptimizingForSpeed ())
653
+ if (Level.isOptimizingForSpeed () && EnableEVLIndVarSimplify )
649
654
FPM.addPass (createFunctionToLoopPassAdaptor (EVLIndVarSimplifyPass ()));
650
655
});
651
656
}
You can’t perform that action at this time.
0 commit comments