You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/passes.ml
+31-15Lines changed: 31 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,8 @@ let avoid_reinterprets = "avoid-reinterprets"
12
12
(** removes arguments to calls in an lto-like manner *)
13
13
let dae ="dae"
14
14
15
-
(** removes arguments to calls in an lto-like manner, and optimizes where we removed *)
15
+
(** removes arguments to calls in an lto-like manner, and optimizes where we
16
+
removed *)
16
17
let dae_optimizing ="dae-optimizing"
17
18
18
19
(** refine and merge abstract (never-created) types *)
@@ -75,7 +76,8 @@ let extract_function_index = "extract-function-index"
75
76
(** flattens out code, removing nesting *)
76
77
let flatten ="flatten"
77
78
78
-
(** emulates function pointer casts, allowing incorrect indirect calls to (sometimes) work *)
79
+
(** emulates function pointer casts, allowing incorrect indirect calls to
80
+
(sometimes) work *)
79
81
let fpcast_emu ="fpcast-emu"
80
82
81
83
(** reports function metrics *)
@@ -84,7 +86,9 @@ let func_metrics = "func-metrics"
84
86
(** generate dynCall fuctions used by emscripten ABI *)
85
87
let generate_dyncalls ="generate-dyncalls"
86
88
87
-
(** generate dynCall functions used by emscripten ABI, but only for functions with i64 in their signature (which cannot be invoked via the wasm table without JavaScript BigInt support). *)
89
+
(** generate dynCall functions used by emscripten ABI, but only for functions
90
+
with i64 in their signature (which cannot be invoked via the wasm table
91
+
without JavaScript BigInt support). *)
88
92
let generate_i64_dyncalls ="generate-i64-dyncalls"
89
93
90
94
(** generate global effect info (helps later passes) *)
@@ -102,7 +106,8 @@ let gsi = "gsi"
102
106
(** globally optimize GC types *)
103
107
let gto ="gto"
104
108
105
-
(** Grand Unified Flow Analysis: optimize the entire program using information about what content can actually appear in each location *)
109
+
(** Grand Unified Flow Analysis: optimize the entire program using information
110
+
about what content can actually appear in each location *)
106
111
let gufa ="gufa"
107
112
108
113
(** GUFA plus local optimizations in functions we modified *)
@@ -132,7 +137,8 @@ let jspi = "jspi"
132
137
(** legalizes i64 types on the import/export boundary *)
133
138
let legalize_js_interface ="legalize-js-interface"
134
139
135
-
(** legalizes i64 types on the import/export boundary in a minimal manner, only on things only JS will call *)
140
+
(** legalizes i64 types on the import/export boundary in a minimal manner, only
141
+
on things only JS will call *)
136
142
let legalize_js_interface_minimally ="legalize-js-interface-minimally"
137
143
138
144
(** common subexpression elimination inside basic blocks *)
@@ -177,17 +183,21 @@ let merge_locals = "merge-locals"
177
183
(** reports metrics *)
178
184
let metrics ="metrics"
179
185
180
-
(** minifies import names (only those, and not export names), and emits a mapping to the minified ones *)
186
+
(** minifies import names (only those, and not export names), and emits a
187
+
mapping to the minified ones *)
181
188
let minify_imports ="minify-imports"
182
189
183
-
(** minifies both import and export names, and emits a mapping to the minified ones *)
190
+
(** minifies both import and export names, and emits a mapping to the minified
191
+
ones *)
184
192
let minify_imports_and_exports ="minify-imports-and-exports"
185
193
186
-
(** minifies both import and export names, and emits a mapping to the minified ones, and minifies the modules as well *)
194
+
(** minifies both import and export names, and emits a mapping to the minified
195
+
ones, and minifies the modules as well *)
187
196
let minify_imports_and_exports_and_modules =
188
197
"minify-imports-and-exports-and-modules"
189
198
190
-
(** apply the assumption that asyncify imports always unwind, and we never rewind *)
199
+
(** apply the assumption that asyncify imports always unwind, and we never
200
+
rewind *)
191
201
let mod_asyncify_always_and_only_unwind ="mod-asyncify-always-and-only-unwind"
192
202
193
203
(** apply the assumption that asyncify never unwinds *)
@@ -202,7 +212,8 @@ let monomorphize_always = "monomorphize-always"
202
212
(** combines multiple memories into a single memory *)
203
213
let multi_memory_lowering ="multi-memory-lowering"
204
214
205
-
(** combines multiple memories into a single memory, trapping if the read or write is larger than the length of the memory's data *)
215
+
(** combines multiple memories into a single memory, trapping if the read or
216
+
write is larger than the length of the memory's data *)
206
217
let multi_memory_lowering_with_bounds_checks =
207
218
"multi-memory-lowering-with-bounds-checks"
208
219
@@ -218,7 +229,8 @@ let once_reduction = "once-reduction"
218
229
(** optimizes added constants into load/store offsets *)
219
230
let optimize_added_constants ="optimize-added-constants"
220
231
221
-
(** optimizes added constants into load/store offsets, propagating them across locals too *)
232
+
(** optimizes added constants into load/store offsets, propagating them across
233
+
locals too *)
222
234
let optimize_added_constants_propagate ="optimize-added-constants-propagate"
223
235
224
236
(** eliminate and reuse casts *)
@@ -245,7 +257,8 @@ let optimize_for_js = "optimize-for-js"
Copy file name to clipboardExpand all lines: src/passes.mli
+29-14Lines changed: 29 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,8 @@ val dae : t
13
13
(** removes arguments to calls in an lto-like manner *)
14
14
15
15
valdae_optimizing : t
16
-
(** removes arguments to calls in an lto-like manner, and optimizes where we removed *)
16
+
(** removes arguments to calls in an lto-like manner, and optimizes where we
17
+
removed *)
17
18
18
19
valabstract_type_refining : t
19
20
(** refine and merge abstract (never-created) types *)
@@ -76,7 +77,8 @@ val flatten : t
76
77
(** flattens out code, removing nesting *)
77
78
78
79
valfpcast_emu : t
79
-
(** emulates function pointer casts, allowing incorrect indirect calls to (sometimes) work *)
80
+
(** emulates function pointer casts, allowing incorrect indirect calls to
81
+
(sometimes) work *)
80
82
81
83
valfunc_metrics : t
82
84
(** reports function metrics *)
@@ -85,7 +87,9 @@ val generate_dyncalls : t
85
87
(** generate dynCall fuctions used by emscripten ABI *)
86
88
87
89
valgenerate_i64_dyncalls : t
88
-
(** generate dynCall functions used by emscripten ABI, but only for functions with i64 in their signature (which cannot be invoked via the wasm table without JavaScript BigInt support). *)
90
+
(** generate dynCall functions used by emscripten ABI, but only for functions
91
+
with i64 in their signature (which cannot be invoked via the wasm table
92
+
without JavaScript BigInt support). *)
89
93
90
94
valgenerate_global_effects : t
91
95
(** generate global effect info (helps later passes) *)
@@ -103,7 +107,8 @@ val gto : t
103
107
(** globally optimize GC types *)
104
108
105
109
valgufa : t
106
-
(** Grand Unified Flow Analysis: optimize the entire program using information about what content can actually appear in each location *)
110
+
(** Grand Unified Flow Analysis: optimize the entire program using information
111
+
about what content can actually appear in each location *)
107
112
108
113
valgufa_optimizing : t
109
114
(** GUFA plus local optimizations in functions we modified *)
@@ -133,7 +138,8 @@ val legalize_js_interface : t
133
138
(** legalizes i64 types on the import/export boundary *)
134
139
135
140
vallegalize_js_interface_minimally : t
136
-
(** legalizes i64 types on the import/export boundary in a minimal manner, only on things only JS will call *)
141
+
(** legalizes i64 types on the import/export boundary in a minimal manner, only
142
+
on things only JS will call *)
137
143
138
144
vallocal_cse : t
139
145
(** common subexpression elimination inside basic blocks *)
@@ -178,16 +184,20 @@ val metrics : t
178
184
(** reports metrics *)
179
185
180
186
valminify_imports : t
181
-
(** minifies import names (only those, and not export names), and emits a mapping to the minified ones *)
187
+
(** minifies import names (only those, and not export names), and emits a
188
+
mapping to the minified ones *)
182
189
183
190
valminify_imports_and_exports : t
184
-
(** minifies both import and export names, and emits a mapping to the minified ones *)
191
+
(** minifies both import and export names, and emits a mapping to the minified
192
+
ones *)
185
193
186
194
valminify_imports_and_exports_and_modules : t
187
-
(** minifies both import and export names, and emits a mapping to the minified ones, and minifies the modules as well *)
195
+
(** minifies both import and export names, and emits a mapping to the minified
196
+
ones, and minifies the modules as well *)
188
197
189
198
valmod_asyncify_always_and_only_unwind : t
190
-
(** apply the assumption that asyncify imports always unwind, and we never rewind *)
199
+
(** apply the assumption that asyncify imports always unwind, and we never
200
+
rewind *)
191
201
192
202
valmod_asyncify_never_unwind : t
193
203
(** apply the assumption that asyncify never unwinds *)
@@ -202,7 +212,8 @@ val multi_memory_lowering : t
202
212
(** combines multiple memories into a single memory *)
203
213
204
214
valmulti_memory_lowering_with_bounds_checks : t
205
-
(** combines multiple memories into a single memory, trapping if the read or write is larger than the length of the memory's data *)
215
+
(** combines multiple memories into a single memory, trapping if the read or
216
+
write is larger than the length of the memory's data *)
206
217
207
218
valnm : t
208
219
(** name list *)
@@ -217,7 +228,8 @@ val optimize_added_constants : t
217
228
(** optimizes added constants into load/store offsets *)
218
229
219
230
valoptimize_added_constants_propagate : t
220
-
(** optimizes added constants into load/store offsets, propagating them across locals too *)
231
+
(** optimizes added constants into load/store offsets, propagating them across
0 commit comments