summaryrefslogtreecommitdiff
path: root/src/pass.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pass.h')
-rw-r--r--src/pass.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pass.h b/src/pass.h
index 2c2fa0619..ab060309b 100644
--- a/src/pass.h
+++ b/src/pass.h
@@ -219,6 +219,16 @@ struct PassOptions {
bool closedWorld = false;
// Whether to try to preserve debug info through, which are special calls.
bool debugInfo = false;
+ // Whether to generate StackIR during binary writing. This is on by default
+ // in -O2 and above.
+ bool generateStackIR = false;
+ // Whether to optimize StackIR during binary writing. How we optimize depends
+ // on other optimization flags like optimizeLevel. This is on by default in
+ // -O2 and above.
+ bool optimizeStackIR = false;
+ // Whether to print StackIR during binary writing, and if so to what stream.
+ // This is mainly useful for debugging.
+ std::optional<std::ostream*> printStackIR;
// Whether we are targeting JS. In that case we want to avoid emitting things
// in the optimizer that do not translate well to JS, or that could cause us
// to need extra lowering work or even a loop (where we optimize to something