Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
Merge branch 'typed-continuations' into forwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
dhil authored Aug 20, 2023
2 parents e76c90e + 81ee017 commit 6540956
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cranelift/codegen/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ impl Context {
self.remove_constant_phis(isa)?;

if opt_level != OptLevel::None {
self.egraph_pass()?;
self.egraph_pass(isa)?;
}

Ok(())
Expand Down Expand Up @@ -345,7 +345,10 @@ impl Context {
}

/// Run optimizations via the egraph infrastructure.
pub fn egraph_pass(&mut self) -> CodegenResult<()> {
pub fn egraph_pass<'a, FOI>(&mut self, fisa: FOI) -> CodegenResult<()>
where
FOI: Into<FlagsOrIsa<'a>>,
{
let _tt = timing::egraph();

trace!(
Expand All @@ -363,6 +366,7 @@ impl Context {
pass.run();
log::debug!("egraph stats: {:?}", pass.stats);
trace!("After egraph optimization:\n{}", self.func.display());
Ok(())

self.verify_if(fisa)
}
}

0 comments on commit 6540956

Please sign in to comment.