Simulation passes¶
-talos-sim-alias-port-connections¶
Share storage across VPI-invisible single-driver port copies
Removes implicit port-connection copy processes of the form
[subelement] load [subelement] store; suspend.change source spawned by
the root initializer. The side that is a whole storage root is replaced
everywhere by the other side: a plain connection redirects its sink to
the source root. With elements, an input from an array element
redirects its sink to that element, and an output into an array element
redirects the child’s output storage. Requires VPI off, no waveform
dumping, no other writer of the eliminated sink or of the target element,
no force/release on either side, and identical types. Copies feeding a
self-settling process, and the first copies below delay-driven roots,
are kept for generated-eval ownership and fanout.
Options¶
-vpi : VPI observability mode: off, read, or full
-elements : Also alias constant-index element connections. Consumers then select their element from the parent root; generated eval does not yet certify every such body or shared-root writer set
Statistics¶
candidates : Port copy candidates examined
aliased : Port copy processes eliminated
-talos-sim-annotate-steady-unknown¶
Record the storage bits expected to hold X/Z in steady state
Sets simulation.steady_unknown on each storage declaration with bits
that hold X/Z once the design runs (SteadyUnknownAnalysis; IEEE
1800-2023 6.8, Table 6-7): fields a design never assigns, and bits that
the repeating writes fill only with such bits or X/Z. The fact is a
guess the generated unknown summary validates at run time: a root whose
unknown plane matches it exactly lets gated copies load those bits as a
constant X. A writable VPI contract records nothing. Run on the
canonical design, before bytecode encoding freezes the processes the
fact covers.
Options¶
-vpi : External observation/mutation contract: off, read, or full
Statistics¶
roots : Storage roots with bits that stay X/Z
bits : Bits that stay X/Z
-talos-sim-compile-random-plans¶
Compile parameterized random arithmetic into exact Boolean plans
Appends a compiled sampling plan to every exact random solve and cyclic sample program nested under the anchor, including typed IEEE arithmetic and numeric real coordinates. Constraint lowering emits the residual programs; the lowering pipeline runs this pass on each function right after it. Existing compiled bundles are retained. Compiler Z3 performs all bit blasting; native, bytecode and WASM targets only bind inputs and sample exact ranks. Unsupported expressions are diagnosed instead of retaining an incomplete search or interpreting floating arithmetic with integral semantics.
-talos-sim-devirtualize-class-calls¶
Resolve exact and monomorphic managed-class dispatches
Tracks exact non-null dynamic classes through allocation, checked casts, and shallow copies, and computes closed-world monomorphic targets for final or non-overridden hierarchies. Virtual function calls with a uniquely resolved effective method are rewritten to ordinary simulation calls so standard call-graph optimization and inlining can see them. Potentially null receivers retain virtual dispatch on a guarded null path. Existing direct class calls are normalized to the same call representation.
Options¶
-preserve-all-methods : Keep every prepared class method for lowering inspection
-talos-sim-eliminate-dead-boundaries¶
Remove dead private simulation function boundaries and calls
Solves whole-design demand across direct function arguments, results, calls, returns, and process spawns. Dead private ABI positions are removed in lockstep at every boundary, and calls to discardable zero-time functions are erased when none of their results are demanded. Context arguments and externally observable or otherwise opaque ABIs are retained conservatively.
Options¶
-missed-remarks : Emit developer remarks for conservatively pinned ABIs
-talos-sim-eliminate-dead-captures¶
Remove unused private simulation entry arguments
Solves argument liveness across direct call and spawn boundaries, then removes dead private captures and formals from functions, processes, and all of their invocation sites. Context arguments and externally observable or otherwise opaque ABIs are retained conservatively.
Options¶
-missed-remarks : Emit developer remarks for conservatively pinned ABIs
-talos-sim-inline¶
Propagate control and inline profitable zero-time calls
Uses MLIR’s SCC inliner for CFG/SSA transformation while Talos owns simulation legality, specialization profitability, hierarchy retention, growth budgets, and deterministic optimization-level presets. Calls that transitively carry process control are mandatory at every optimization level; ordinary calls remain subject to the selected profitability preset.
Options¶
-opt-level : Profitability preset from 0 (mandatory control only) through 3
-tiny-cost : Override the preset tiny-leaf weighted cost threshold
-specialization-cost : Override the specialization-candidate weighted cost threshold
-caller-growth-percent : Override caller growth percentage budget
-caller-growth-constant : Override caller fixed weighted-growth budget
-design-growth-percent : Override design growth percentage budget
-design-growth-constant : Override design fixed weighted-growth budget
-max-iterations : Override the maximum SCC inlining iterations
-missed-remarks : Emit a remark explaining every missed inline opportunity
-talos-sim-insert-gc-polls¶
Place managed-heap collection polls for polled collection
Under polled collection, compiled code exposes its managed values to the
collector only at simulation.gc.safepoint polls and at calls that may
reach one. Allocation records pressure but never collects; the heap
reclaims at polls, between activations, and at designated schedule points.
IEEE 1800-2023 8.29 leaves the timing of reclamation to the
implementation.
The pass places a poll before the first allocation of every block on a
control-flow cycle that avoids each suspension returning to the scheduler,
before every allocating call that may re-enter its caller, and at the entry
of every allocating DPI export, so garbage between two collection
opportunities stays bounded. Every call into compiled code that cannot
reach a poll is marked simulation.gc_poll_free, and the module is marked
gc.polled; root instrumentation then registers managed values
only where a collection can observe them. Rerunning the pass adds nothing.
Statistics¶
polls : Collection polls placed
poll-free-calls : Calls proven unable to reach a collection poll
-talos-sim-mark-bounded-loops¶
Record the termination proof for bounded induction loops
Marks every constant-induction, non-suspending CFG loop whose exit is proven in closed form, including loops the unroller refused to replicate because their trip count or body size exceeded its budget. The mark carries no iteration count and changes no IR; it lets schedule-group classification distinguish such a loop from an unbounded control loop, which IEEE 1800-2023 12.7.6 describes as able to hang the event scheduler.
-talos-sim-propagate-initialized-storage¶
Propagate initialized scalar storage through whole and sliced reads
Proves a unique constant whole-storage initializer executes before process startup, including stores inlined into the root initializer. Replaces whole and fixed packed-slice reads while preserving four-state X/Z planes and the observable initializing store. Later writes, opaque aliases, initializer reads, and externally writable state conservatively prevent propagation.
Options¶
-vpi : VPI observability mode: off, read, or full
-talos-sim-refine-continuous-sensitivity¶
Refine pure continuous RHS wakeups with sparse storage ranges
Narrow change watches for stateless, single-writer continuous assignments under IEEE 1800-2023 10.3.2. Sparse handle provenance bounds every RHS load; dense must-definition analysis proves the store executes before suspension. Dynamic selections retain their entire static parent range. Procedural implicit sensitivity and port-copy cohorts retain their existing watches. Requires VPI off and closed, unambiguous storage bindings. Run before compute-graph construction, after executable simplification.
Options¶
-vpi : External observation/mutation contract
Statistics¶
refined : Continuous processes with narrower wakeups
-talos-sim-sccp¶
Propagate constants across simulation code-unit boundaries
Runs MLIR sparse conditional constant propagation independently within isolated simulation code units and deterministically exchanges constants across direct calls, process spawns, and returns until reaching a fixed point.
Options¶
-vpi : VPI observability mode: off, read, or full
-talos-sim-simplify-bodies¶
Simplify semantic bodies using sparse bits and dense memory SSA facts
Options¶
-vpi : External observation/mutation contract: off, read, or full
-talos-sim-thread-suspension¶
Thread promoted SSA state through suspension continuations
-talos-sim-unroll-bounded-loops¶
Unroll small constant-trip, non-suspending CFG loops
Options¶
-maximum-loop-size : Maximum simplified weighted cost per complete loop nest before packed expansion (zero disables unrolling)