Module org.kink_lang.kink
Package org.kink_lang.kink.internal.program.itreeoptimize
package org.kink_lang.kink.internal.program.itreeoptimize
Provides optimizers of itrees.
-
ClassDescriptionConverts expression like
[:X :Y] <- \args
to ArgsPassingItree.Optimizes a mcall likeX <- Y
to AssignmentItree.Base class for optimizing visitors.Optimizes bi arithmetic operations to BiArithmeticItree..Applies inlining of calls of branch in the form below.Applies inlining of calls of branch in the form below.Propagates the content of local var in its dereference.Eliminates lstore to unused lvars.Reduces a one step seq to an expression, removing the parentheses.Eliminates unused code from a seq.Flattens a seq recursively.Converts method call of Fun.call to symcall.Inlining optimizer of preloadedif
.A class to provide the optimizer of itrees.Optimizes\binding.Data
toData
.Unifies consequent letrec into a single letrec.Converts:foo <- { ,,, }
to letrec.Remove assignment from letrec if the lvar is not used.Inlining optimizer of a let clause on the tail context.Optimizer from:Val <- 42
to an LSTORE itree.Applies constant folding for expressions in the form- NUM_CONST
.Converts expression like[:X :Y] <- \args
to ArgsPassingItree.Inlining of assignment in the form[:X [:Y :Z]] <- Rhs
.Optimizes[:A :B :C.opt :D.opt :Rest.rest] <- xxx
to OptRestVecAssignmentItree.Optimizes assignment in the form[:A :B :C.opt :D.opt] <- xxx
.Optimizer which puts the continuation of a seq into the seq.A recursive composite optimizer.Composite optimizer which applies the component optimizers until it reaches the fixed point.Optimizes[:Rest.rest] <- xxx
to RestVecAssignmentItree.Optimizes invocation in the formnew_val('X' x 'Y' y)
.Converts a fun to SSA form if possible.Optimizer fromB:X <- 42
to a STORE itree.Converts an assignment to args passing.Converts expression likenew_val(... Trait 'X' 10 'Y' 20)
to TraitNewValItree.Converts nested args passing to unnested one.Optimizes an assignment in the form[X:Foo Y:Bar] <- Rhs
to VarrefVecAssignmentItree.Optimizes a VarrefVecAssignmentItree to a better form.