[deploy]暂时禁用-O1
This commit is contained in:
@@ -256,7 +256,7 @@ std::string RISCv64CodeGen::function_gen(Function* func) {
|
|||||||
<< ss_after_eli.str();
|
<< ss_after_eli.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (optLevel > 0) {
|
if (optLevel == 0) {
|
||||||
// 阶段 2.1: 除法强度削弱优化 (Division Strength Reduction)
|
// 阶段 2.1: 除法强度削弱优化 (Division Strength Reduction)
|
||||||
DivStrengthReduction div_strength_reduction;
|
DivStrengthReduction div_strength_reduction;
|
||||||
div_strength_reduction.runOnMachineFunction(mfunc.get());
|
div_strength_reduction.runOnMachineFunction(mfunc.get());
|
||||||
@@ -372,7 +372,7 @@ std::string RISCv64CodeGen::function_gen(Function* func) {
|
|||||||
mfunc->dumpStackFrameInfo(std::cerr);
|
mfunc->dumpStackFrameInfo(std::cerr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (optLevel > 0) {
|
if (optLevel == 0) {
|
||||||
// 阶段 4: 窥孔优化 (Peephole Optimization)
|
// 阶段 4: 窥孔优化 (Peephole Optimization)
|
||||||
PeepholeOptimizer peephole;
|
PeepholeOptimizer peephole;
|
||||||
peephole.runOnMachineFunction(mfunc.get());
|
peephole.runOnMachineFunction(mfunc.get());
|
||||||
|
|||||||
@@ -70,6 +70,9 @@ void parseArgs(int argc, char **argv) {
|
|||||||
if (optLevel < 0) {
|
if (optLevel < 0) {
|
||||||
cerr << "Error: Optimization level must be non-negative." << endl;
|
cerr << "Error: Optimization level must be non-negative." << endl;
|
||||||
usage(EXIT_FAILURE);
|
usage(EXIT_FAILURE);
|
||||||
|
} else if (optLevel > 0) {
|
||||||
|
cerr << "Debugging, set optLevel to 0...\n";
|
||||||
|
optLevel = 0;
|
||||||
}
|
}
|
||||||
} catch (const std::invalid_argument& ia) {
|
} catch (const std::invalid_argument& ia) {
|
||||||
cerr << "Error: Invalid argument for -O: " << optarg << endl;
|
cerr << "Error: Invalid argument for -O: " << optarg << endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user