MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
flags.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4
5#include "mim/config.h"
6
7namespace mim {
8
9/// Compiler switches that must be saved and looked up in later phases of compilation.
10/// @see @ref cli
11struct Flags {
12 /// How (if at all) to report Phase runtimes; @see fe::Profiler.
13 enum class Profile {
14 None, ///< No profiling.
15 Summary, ///< Flat table aggregated by Phase name.
16 Tree, ///< Indented tree preserving the order in which Phase%es ran.
17 Trace, ///< chrome://tracing compatible output.
18 };
19
20 uint64_t scalarize_threshold = 32;
21 uint32_t max_fp_iters = 1024; // max number of fixed-point iterations before a Phase errors out
22 uint32_t pe_fuel = 1024; // max nesting depth of partial evaluations before World::app errors out
23
24 bool ascii = false;
25 bool mim_typed_let = false;
26 bool bootstrap = false;
27 bool force_load = false;
28 Profile profile = Profile::None; // how to report Phase runtimes
29 bool aggressive_lam_spec = false; // HACK makes LamSpec more agressive but potentially non-terminating
30#ifdef MIM_ENABLE_CHECKS
31 bool reeval_breakpoints = false;
32 bool trace_gids = false;
33 bool break_on_error = false;
34 bool break_on_warn = false;
35 bool break_on_alpha = false;
36#endif
37};
38
39} // namespace mim
Definition ast.h:16
Compiler switches that must be saved and looked up in later phases of compilation.
Definition flags.h:11
uint64_t scalarize_threshold
Definition flags.h:20
bool trace_gids
Definition flags.h:32
bool mim_typed_let
Definition flags.h:25
bool break_on_error
Definition flags.h:33
Profile
How (if at all) to report Phase runtimes;.
Definition flags.h:13
@ None
No profiling.
Definition flags.h:14
bool aggressive_lam_spec
Definition flags.h:29
bool reeval_breakpoints
Definition flags.h:31
uint32_t pe_fuel
Definition flags.h:22
bool bootstrap
Definition flags.h:26
bool ascii
Definition flags.h:24
uint32_t max_fp_iters
Definition flags.h:21
bool force_load
Definition flags.h:27
bool break_on_warn
Definition flags.h:34
bool break_on_alpha
Definition flags.h:35
Profile profile
Definition flags.h:28