Aiken UPLC Optimization overhaul (#1052)
* Refactor and structuring optimizations to be less computationally heavy * Forgot to commit the new file containing the optimization do over * Point to correct functions in shrinker2 * Split out inline_constr_ops since it adds in builtins that can then be swept up by the builtin force reduction * Fix: issue where identity reducer was always returning true * Forward inlining on lambdas produces better results. This is due to a forward pass being able to apply an argument that may have no_inline at the top where as vice-versa would reduce the arg first. * Clippy and test fixes * Clear no_inlines when inlining a function * Convert shrinker2 to replace shrinker and update tests
This commit is contained in:
@@ -3782,7 +3782,7 @@ impl<'a> CodeGenerator<'a> {
|
||||
interner.program(&mut program);
|
||||
|
||||
let eval_program: Program<NamedDeBruijn> =
|
||||
program.remove_no_inlines().try_into().unwrap();
|
||||
program.clean_up().try_into().unwrap();
|
||||
|
||||
Some(
|
||||
eval_program
|
||||
@@ -3892,7 +3892,7 @@ impl<'a> CodeGenerator<'a> {
|
||||
interner.program(&mut program);
|
||||
|
||||
let eval_program: Program<NamedDeBruijn> =
|
||||
program.remove_no_inlines().try_into().unwrap();
|
||||
program.clean_up().try_into().unwrap();
|
||||
|
||||
let evaluated_term: Term<NamedDeBruijn> = eval_program
|
||||
.eval(ExBudget::default())
|
||||
@@ -4434,7 +4434,7 @@ impl<'a> CodeGenerator<'a> {
|
||||
interner.program(&mut program);
|
||||
|
||||
let eval_program: Program<NamedDeBruijn> =
|
||||
program.remove_no_inlines().try_into().unwrap();
|
||||
program.clean_up().try_into().unwrap();
|
||||
|
||||
let evaluated_term: Term<NamedDeBruijn> = eval_program
|
||||
.eval(ExBudget::default())
|
||||
@@ -4459,7 +4459,7 @@ impl<'a> CodeGenerator<'a> {
|
||||
interner.program(&mut program);
|
||||
|
||||
let eval_program: Program<NamedDeBruijn> =
|
||||
program.remove_no_inlines().try_into().unwrap();
|
||||
program.clean_up().try_into().unwrap();
|
||||
|
||||
let evaluated_term: Term<NamedDeBruijn> = eval_program
|
||||
.eval(ExBudget::default())
|
||||
@@ -4880,7 +4880,7 @@ impl<'a> CodeGenerator<'a> {
|
||||
interner.program(&mut program);
|
||||
|
||||
let eval_program: Program<NamedDeBruijn> =
|
||||
program.remove_no_inlines().try_into().unwrap();
|
||||
program.clean_up().try_into().unwrap();
|
||||
|
||||
let evaluated_term: Term<NamedDeBruijn> = eval_program
|
||||
.eval(ExBudget::default())
|
||||
|
||||
Reference in New Issue
Block a user