feat: add expression statements and assign expressions
This commit is contained in:
@@ -29,6 +29,9 @@ fn optimize_function(func: &mut MirFunction) {
|
||||
// Replace the complex instruction with a simple constant use
|
||||
*rvalue = Rvalue::Use(Operand::Constant(constant.clone()));
|
||||
known_constants.insert(*local, constant);
|
||||
} else {
|
||||
// Reassigned to a non-computable value; remove older cached inferences
|
||||
known_constants.remove(local);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user