Skip to content

Commit

Permalink
Add simplifycfg pass to llvm output
Browse files Browse the repository at this point in the history
  • Loading branch information
ezrosent committed Jan 30, 2025
1 parent 8575c6b commit 8f9b0f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1119,10 +1119,11 @@ impl Run {
"clang"
};

// first, run sroa to get rid of memory-based registers
// Run sroa to get rid of memory-based registers
// Run simplifycfg to remove any remaining extraneous jumps introduced by RVSDG conversion
// from the bril2llvm compiler
let res = Command::new(opt_cmd)
.arg("-passes=sroa")
.arg("-passes=sroa,simplifycfg")
.arg("-S")
.arg(file_path.clone())
.arg("-o")
Expand Down

0 comments on commit 8f9b0f7

Please sign in to comment.