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>
114114 cl::desc (" Enable Machine Pipeliner for RISC-V" ),
115115 cl::init(false ), cl::Hidden);
116116
117+ static cl::opt<bool >
118+ EnableEVLIndVarSimplify (" riscv-simplify-evl-iv" ,
119+ cl::desc (" Enable the EVLIndVarSimplify pass." ),
120+ cl::init(false ), cl::Hidden);
121+
117122extern " C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTarget () {
118123 RegisterTargetMachine<RISCVTargetMachine> X (getTheRISCV32Target ());
119124 RegisterTargetMachine<RISCVTargetMachine> Y (getTheRISCV64Target ());
@@ -645,7 +650,7 @@ void RISCVTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) {
645650
646651 PB.registerVectorizerEndEPCallback (
647652 [](FunctionPassManager &FPM, OptimizationLevel Level) {
648- if (Level.isOptimizingForSpeed ())
653+ if (Level.isOptimizingForSpeed () && EnableEVLIndVarSimplify )
649654 FPM.addPass (createFunctionToLoopPassAdaptor (EVLIndVarSimplifyPass ()));
650655 });
651656}
You can’t perform that action at this time.
0 commit comments