Skip to content

Commit 80cc26a

Browse files
committed
add reorder-locals
1 parent bebcc54 commit 80cc26a

File tree

88 files changed

+25369
-24973
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+25369
-24973
lines changed

src/module.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2395,6 +2395,7 @@ export class Module {
23952395
passes.push("vacuum");
23962396

23972397
passes.push("ssa-nomerge");
2398+
passes.push("reorder-locals");
23982399
passes.push("coalesce-locals");
23992400
}
24002401
passes.push("remove-unused-brs");

tests/compiler/NonNullable.optimized.wat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@
109109
if
110110
local.get $2
111111
i32.load16_u
112-
local.tee $4
112+
local.tee $3
113113
local.get $1
114114
i32.load16_u
115-
local.tee $3
115+
local.tee $4
116116
i32.ne
117117
if
118-
local.get $4
119118
local.get $3
119+
local.get $4
120120
i32.sub
121121
br $__inlined_func$~lib/util/string/compareImpl
122122
end

tests/compiler/builtins.optimized.wat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@
165165
if
166166
local.get $2
167167
i32.load16_u
168-
local.tee $4
168+
local.tee $3
169169
local.get $1
170170
i32.load16_u
171-
local.tee $3
171+
local.tee $4
172172
i32.ne
173173
if
174-
local.get $4
175174
local.get $3
175+
local.get $4
176176
i32.sub
177177
br $__inlined_func$~lib/util/string/compareImpl
178178
end

0 commit comments

Comments
 (0)