Struct cretonne_codegen::Context [] [src]

pub struct Context {
    pub func: Function,
    pub cfg: ControlFlowGraph,
    pub domtree: DominatorTree,
    pub regalloc: Context,
    pub loop_analysis: LoopAnalysis,
}

Persistent data structures and compilation pipeline.

Fields

The function we're compiling.

The control flow graph of func.

Dominator tree for func.

Register allocation context.

Loop analysis of func.

Methods

impl Context
[src]

[src]

Allocate a new compilation context.

The returned instance should be reused for compiling multiple functions in order to avoid needless allocator thrashing.

[src]

Allocate a new compilation context with an existing Function.

The returned instance should be reused for compiling multiple functions in order to avoid needless allocator thrashing.

[src]

Clear all data structures in this context.

[src]

Compile the function.

Run the function through all the passes necessary to generate code for the target ISA represented by isa. This does not include the final step of emitting machine code into a code sink.

Returns the size of the function's code.

[src]

Emit machine code directly into raw memory.

Write all of the function's machine code to the memory at mem. The size of the machine code is returned by compile above.

The machine code is not relocated. Instead, any relocations are emitted into relocs.

[src]

Run the verifier on the function.

Also check that the dominator tree and control flow graph are consistent with the function.

[src]

Run the verifier only if the enable_verifier setting is true.

[src]

Run the locations verifier on the function.

[src]

Run the locations verifier only if the enable_verifier setting is true.

[src]

Perform dead-code elimination on the function.

[src]

Perform pre-legalization rewrites on the function.

[src]

Run the legalizer for isa on the function.

[src]

Perform post-legalization rewrites on the function.

[src]

Compute the control flow graph.

[src]

Compute dominator tree.

[src]

Compute the loop analysis.

[src]

Compute the control flow graph and dominator tree.

[src]

Perform simple GVN on the function.

[src]

Perform LICM on the function.

[src]

Perform unreachable code elimination.

[src]

Run the register allocator.

[src]

Insert prologue and epilogues after computing the stack frame layout.

[src]

Run the branch relaxation pass and return the final code size.

Trait Implementations

Auto Trait Implementations

impl Send for Context

impl Sync for Context