Skip to content

Commit

Permalink
splitloopbylength format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
chen.qian committed Nov 19, 2024
1 parent f06e8b6 commit e369a4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions llvm/lib/Target/RISCV/RISCVSplitLoopByLength.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ struct RISCVSplitLoopByLengthPass : public PassInfoMixin<RISCVSplitLoopByLengthP

PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);

// void printPipeline(raw_ostream &OS,
// function_ref<StringRef(StringRef)> MapClassName2PassName);

static bool isRequired() { return true; }
};

Expand Down
8 changes: 4 additions & 4 deletions llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ static cl::opt<bool> EnableMISchedLoadClustering(
cl::desc("Enable load clustering in the machine scheduler"),
cl::init(false));

static cl::opt<bool> EnableEsp32P4Optimize(
"enable-esp32-p4-optimize", cl::init(false),cl::Hidden,
cl::desc("enable esp32 p4 optimize"));
static cl::opt<bool>
EnableEsp32P4Optimize("enable-esp32-p4-optimize", cl::init(false),
cl::Hidden, cl::desc("enable esp32 p4 optimize"));

extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTarget() {
RegisterTargetMachine<RISCVTargetMachine> X(getTheRISCV32Target());
Expand Down Expand Up @@ -461,7 +461,7 @@ void RISCVTargetMachine::registerPassBuilderCallbacks(
}
return false;
});

PB.registerOptimizerLastEPCallback(
[](ModulePassManager &PM, OptimizationLevel Level) {
if(EnableEsp32P4Optimize && (Level == OptimizationLevel::O3 || Level == OptimizationLevel::O2)){
Expand Down

0 comments on commit e369a4a

Please sign in to comment.