Skip to content

Commit

Permalink
[Compiler V2] Turn on CFG simplification as default optimization (#14923
Browse files Browse the repository at this point in the history
)

* enable cfg simpl

* disable cfg simpl for prover

---------

Co-authored-by: Zekun Wang <[email protected]>
  • Loading branch information
fEst1ck and Zekun Wang authored Oct 22, 2024
1 parent bb6b5c7 commit cae7cd3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion third_party/move/move-compiler-v2/src/experiments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ pub static EXPERIMENTS: Lazy<BTreeMap<String, Experiment>> = Lazy::new(|| {
Experiment {
name: Experiment::CFG_SIMPLIFICATION.to_string(),
description: "Whether to do the control flow graph simplification".to_string(),
default: Inherited(Experiment::OPTIMIZE_WAITING_FOR_COMPARE_TESTS.to_string()),
default: Inherited(Experiment::OPTIMIZE.to_string()),
},
Experiment {
name: Experiment::COPY_PROPAGATION.to_string(),
Expand Down
1 change: 1 addition & 0 deletions third_party/move/move-compiler-v2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ pub fn run_move_compiler_for_analysis(
options.whole_program = true; // will set `treat_everything_as_target`
options = options.set_experiment(Experiment::SPEC_REWRITE, true);
options = options.set_experiment(Experiment::ATTACH_COMPILED_MODULE, true);
options = options.set_experiment(Experiment::CFG_SIMPLIFICATION, false);
let (env, _units) = run_move_compiler(error_writer, options)?;
// Reset for subsequent analysis
env.treat_everything_as_target(false);
Expand Down

0 comments on commit cae7cd3

Please sign in to comment.