summaryrefslogtreecommitdiff
path: root/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/frontend/lower.go
diff options
context:
space:
mode:
authorLibravatar Daenney <daenney@users.noreply.github.com>2024-06-12 14:21:34 +0200
committerLibravatar GitHub <noreply@github.com>2024-06-12 13:21:34 +0100
commit978b4176f1a31a497aaadd33f21659b318832c95 (patch)
tree8ab36617b993a457af5d2975bedaa63a57031ff3 /vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/frontend/lower.go
parent[bugfix] Correct Swagger path for poll voting (#2996) (diff)
downloadgotosocial-978b4176f1a31a497aaadd33f21659b318832c95.tar.xz
[chore] Upgrade wasm-sqlite to v0.16.2 (#2997)
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.go12
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 {