diff options
Diffstat (limited to 'src/pass.h')
-rw-r--r-- | src/pass.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pass.h b/src/pass.h index 4ab0a8c34..36d49f7b7 100644 --- a/src/pass.h +++ b/src/pass.h @@ -217,6 +217,12 @@ struct PassOptions { bool closedWorld = false; // Whether to try to preserve debug info through, which are special calls. bool debugInfo = false; + // 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 + // that needs lowering, then we lower it, then we can optimize it again to the + // original form). + bool targetJS = false; // Arbitrary string arguments from the commandline, which we forward to // passes. std::unordered_map<std::string, std::string> arguments; |