Skip to content

Commit 8464560

Browse files
committed
default enable inst-combine to avoid ungrounded
1 parent 9dcd124 commit 8464560

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

godel-script/godel-frontend/src/cli.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ std::ostream& help(std::ostream& out) {
110110
<< reset << "Enable souffle code generator for statement optimizer.\n"
111111
<< green << " -Ol, --opt-let "
112112
<< reset << "Enable souffle code generator let statement optimizer(not suggested).\n"
113-
<< green << " -Oim, --opt-ir-merge "
114-
<< reset << "Enable souffle inst combine pass.\n"
115113
<< green << " -Osc, --opt-self-constraint "
116114
<< reset << "Enable self data constraint optimizer in souffle code generator.\n"
117115
<< green << " -Ojr, --opt-join-reorder "
118116
<< reset << "Enable join reorder optimizer(experimental).\n"
117+
<< green << " --disable-inst-combine "
118+
<< reset << "Disable instruction combine pass.\n"
119119
<< green << " --disable-remove-unused "
120120
<< reset << "Disable unused method deletion pass.\n"
121121
<< green << " --disable-do-schema-opt "

godel-script/godel-frontend/src/cli.h

+3-6
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ enum class option {
4646
/* optimization */
4747
cli_enable_for_opt, // switch for optimization on
4848
cli_enable_let_opt, // switch let optimization on
49-
cli_enable_ir_merge, // switch ir merge on
5049
cli_enable_self_constraint_opt, // switch self constraint optimization on
5150
cli_enable_join_reorder, // switch join reorder optimization on
51+
cli_disable_inst_combine, // switch inst combine off
5252
cli_disable_remove_unused, // switch unused method deletion off
5353
cli_disable_do_schema_opt, // switch do schema optimization off
5454
cli_souffle_debug_dump, // switch souffle debug mode on
@@ -121,12 +121,11 @@ const std::unordered_map<std::string, option> options = {
121121
{"-Of", option::cli_enable_for_opt},
122122
{"--opt-let", option::cli_enable_let_opt},
123123
{"-Ol", option::cli_enable_let_opt},
124-
{"--opt-ir-merge", option::cli_enable_ir_merge},
125-
{"-Oim", option::cli_enable_ir_merge},
126124
{"--opt-self-constraint", option::cli_enable_self_constraint_opt},
127125
{"-Osc", option::cli_enable_self_constraint_opt},
128126
{"--opt-join-reorder", option::cli_enable_join_reorder},
129127
{"-Ojr", option::cli_enable_join_reorder},
128+
{"--disable-inst-combine", option::cli_disable_inst_combine},
130129
{"--disable-remove-unused", option::cli_disable_remove_unused},
131130
{"--disable-do-schema-opt", option::cli_disable_do_schema_opt},
132131
{"--souffle-debug", option::cli_souffle_debug_dump},
@@ -142,11 +141,9 @@ const std::unordered_map<std::string, option> options = {
142141
const std::unordered_map<std::string, std::vector<option>> multi_options = {
143142
{"-O1", {option::cli_enable_for_opt}},
144143
{"-O2", {option::cli_enable_for_opt,
145-
option::cli_enable_self_constraint_opt,
146-
option::cli_enable_ir_merge}},
144+
option::cli_enable_self_constraint_opt}},
147145
{"-O3", {option::cli_enable_for_opt,
148146
option::cli_enable_self_constraint_opt,
149-
option::cli_enable_ir_merge,
150147
option::cli_enable_join_reorder}}
151148
};
152149

godel-script/godel-frontend/src/ir/pass_manager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void pass_manager::run(ir_context& ctx, const cli::configure& conf) {
2828
ordered_pass_list.push_back(new unused_remove_pass(ctx));
2929
ordered_pass_list.push_back(new unused_type_alias_remove_pass(ctx));
3030
}
31-
if (conf.count(cli::option::cli_enable_ir_merge)) {
31+
if (!conf.count(cli::option::cli_disable_inst_combine)) {
3232
ordered_pass_list.push_back(new inst_combine_pass(ctx));
3333
}
3434
ordered_pass_list.push_back(new flatten_nested_block(ctx));

0 commit comments

Comments
 (0)