Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
clyben committed May 11, 2024
1 parent 11b226c commit 214c313
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/rvsdg/from_dag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ impl<'a> TreeToRvsdg<'a> {
assert_eq!(res.len(), 1, "Expected exactly one result for Single node");
res
}
Expr::Symbolic(_) => panic!("symbolic not supported")
Expr::Symbolic(_) => panic!("symbolic not supported"),
};
self.translation_cache
.insert(Rc::as_ptr(&expr), res.clone());
Expand Down
22 changes: 10 additions & 12 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,18 +655,16 @@ impl Run {
let rvsdg = Optimizer::program_to_rvsdg(&self.prog_with_args.program)?;
let dag = rvsdg.to_dag_encoding(true);
let optimized = dag_in_context::optimize(&dag).map_err(EggCCError::EggLog)?;
let res = std::iter::once(
PrettyPrinter::from_expr(optimized.entry)
.to_rust_default(),
)
.chain(
optimized
.functions
.into_iter()
.map(|expr| PrettyPrinter::from_expr(expr).to_rust_default()),
)
.collect::<Vec<_>>()
.join("\n\n");
let res =
std::iter::once(PrettyPrinter::from_expr(optimized.entry).to_rust_default())
.chain(
optimized
.functions
.into_iter()
.map(|expr| PrettyPrinter::from_expr(expr).to_rust_default()),
)
.collect::<Vec<_>>()
.join("\n\n");
(
vec![Visualization {
result: res,
Expand Down

0 comments on commit 214c313

Please sign in to comment.