Files
wasmtime/cranelift/frontend
Adam Bratschi-Kaye 562bb25360 Memoize can_optimize_var_lookup (#4924)
* Memoize `can_optimize_var_lookup`

`can_optimize_var_lookup` can have quadratic behavior if there is a chain
of blocks each containing a `local.get` instruction because each run can
walk up the entire chain. This change memoizes the results of
`can_optimize_var_lookup` so that we can stop following the chain of
predecessors when we hit a block that has previously been handled
(making the operation linear again).
2022-09-19 10:18:11 -07:00
..
2022-09-06 13:49:56 -05:00

This crate provides a straightforward way to create a Cranelift IR function and fill it with instructions translated from another language. It contains an SSA construction module that provides convenient methods for translating non-SSA variables into SSA Cranelift IR values via use_var and def_var calls.