Skip to content

Commit

Permalink
Implement common subexpression elimination
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Steuernagel <[email protected]>
  • Loading branch information
LucasSte committed Nov 10, 2021
1 parent e3237e9 commit 53074dc
Show file tree
Hide file tree
Showing 16 changed files with 2,400 additions and 826 deletions.
7 changes: 7 additions & 0 deletions src/bin/solang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ fn main() {
.long("math-overflow")
.display_order(5),
)
.arg(
Arg::with_name("COMMONEXPRESSIONELIMINATION")
.help("Disable common subexpression elimination")
.long("no-cse")
.display_order(6),
)
.arg(
Arg::with_name("LANGUAGESERVER")
.help("Start language server on stdin/stdout")
Expand Down Expand Up @@ -307,6 +313,7 @@ fn main() {
strength_reduce: !matches.is_present("STRENGTHREDUCE"),
constant_folding: !matches.is_present("CONSTANTFOLDING"),
vector_to_slice: !matches.is_present("VECTORTOSLICE"),
common_subexpression_elimination: !matches.is_present("COMMONEXPRESSIONELIMINATION"),
math_overflow_check,
opt_level,
};
Expand Down
Loading

0 comments on commit 53074dc

Please sign in to comment.