very basic const propagation possible

This commit is contained in:
nora 2022-04-16 23:14:33 +02:00
parent 80b1b0e3f6
commit 9db60ac38d
6 changed files with 45 additions and 15 deletions

View file

@ -54,10 +54,10 @@ enum StmtKind<'mir> {
SetN(u8, Store),
}
#[tracing::instrument]
#[tracing::instrument(skip(alloc, hir))]
pub fn optimized_mir<'mir>(alloc: &'mir Bump, hir: &Hir<'_>) -> Mir<'mir> {
let mut mir = hir_to_mir(alloc, hir);
opts::pass_get_state_info(alloc, &mut mir);
opts::passes(alloc, &mut mir);
mir
}