Skip to main content

Module core

Module core 

Source
Expand description

Passes. A Pass transforms an IRModule under the current PassContext, which decides the passes that run and the instruments that observe them; ModulePass wraps a function and Sequential runs passes in order.

Structs§

ModulePass
A pass that applies a function to the whole module.
ModulePassObj
The object behind ModulePass.
Pass
A transformation of an IRModule, with a name and an optimization level (PassInfo).
PassContext
The settings passes run under: the optimization level opt_level, the passes in required_pass and disabled_pass, the configuration options config and the instruments.
PassContextObj
The object behind PassContext.
PassContextScope
A scope in which a pass context is the current one, returned by PassContext::enter.
PassInfo
The name name and optimization level opt_level of a pass, by which a PassContext requires, disables or skips it.
PassInfoObj
The object behind PassInfo.
PassInstrument
The base of instruments, which a PassContext calls around each pass it runs, such as to trace or time them.
PassInstrumentObj
The object behind PassInstrument.
PassObj
The object behind Pass.
Sequential
A pass that runs a list of passes in order, skipping the ones the current PassContext does not enable.
SequentialObj
The object behind Sequential.

Functions§

print_ir
Create a pass that logs header and the module, which it returns unchanged (transform.PrintIR).