Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinChung2000 committed Jan 21, 2025
1 parent 1e77bf6 commit 773811e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions calyx-opt/src/pass_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,11 @@ impl PassManager {
let start = Instant::now();
pass(ctx)?;
if dump_ir {
eprint!("\nAfter pass: {}\n", name);
println!("After pass: {}", name);
ir::Printer::write_context(
ctx,
true,
&mut std::io::stderr(),
&mut std::io::stdout(),
)?;
}
let elapsed = start.elapsed();
Expand Down
13 changes: 4 additions & 9 deletions src/cmdline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ pub struct Opts {
#[argh(option, short = 'b', default = "BackendOpt::default()")]
pub backend: BackendOpt,

/// run a pass or passes during execution. You can supply multiple -p to specify the pass pipeline
/// and the passes will and executed in the order it passed in. Alternatively you can provide the
/// passes by a semicolon separated string. "p1;p2" is the same as "-p p1 -p p2" and will run p1 then p2.
/// run a pass or passes during execution. You can supply multiple -p to specify the pass pipeline
/// and the passes will and executed in the order it passed in. i.e."-p p1 -p p2" and will run p1 then p2.
/// Accept alias. Default is "all"
#[argh(option, short = 'p')]
pub pass: Vec<String>,
Expand All @@ -92,7 +91,8 @@ pub struct Opts {
#[argh(option, short = 'x', long = "extra-opt")]
pub extra_opts: Vec<String>,

/// establish a relative ordering of passes. "a:b" will insert pass `b` after pass `a`
/// establish a relative ordering of passes. "a:b" will move pass `b` after pass `a`.
/// Similar to the `-p` flag, you can supply multiple `-i` flags to specify multiple ordering constraints.
#[argh(option, short = 'i', long = "insert")]
pub insertions: Vec<String>,

Expand Down Expand Up @@ -212,11 +212,6 @@ impl Opts {
if opts.pass.is_empty() {
opts.pass = vec!["all".into()];
}
else {
opts.pass = opts.pass.iter()
.flat_map(|s| s.split(';').map(String::from))
.collect();
}

Ok(opts)
}
Expand Down

0 comments on commit 773811e

Please sign in to comment.