diff options
Diffstat (limited to 'vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/frontend/lower.go')
-rw-r--r-- | vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/frontend/lower.go | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/frontend/lower.go b/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/frontend/lower.go index 5096a6365..ff963e605 100644 --- a/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/frontend/lower.go +++ b/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/frontend/lower.go @@ -1086,16 +1086,8 @@ func (c *Compiler) lowerCurrentOpcode() { break } variable := c.localVariable(index) - if _, ok := c.m.NonStaticLocals[c.wasmLocalFunctionIndex][index]; ok { - state.push(builder.MustFindValue(variable)) - } else { - // If a local is static, we can simply find it in the entry block which is either a function param - // or a zero value. This fast pass helps to avoid the overhead of searching the entire function plus - // avoid adding unnecessary block arguments. - // TODO: I think this optimization should be done in a SSA pass like passRedundantPhiEliminationOpt, - // but somehow there's some corner cases that it fails to optimize. - state.push(builder.MustFindValueInBlk(variable, c.ssaBuilder.EntryBlock())) - } + state.push(builder.MustFindValue(variable)) + case wasm.OpcodeLocalSet: index := c.readI32u() if state.unreachable { |