libFirm
Loading...
Searching...
No Matches
Just in Time Compilation

Typedefs

typedef struct ir_jit_segment_t ir_jit_segment_t
 Just in time compilation environment.
 
typedef struct ir_jit_function_t ir_jit_function_t
 Just in time compiled function with potentially unresolved relocations.
 

Functions

ir_jit_segment_tbe_new_jit_segment (void)
 Create a new jit segment.
 
void be_destroy_jit_segment (ir_jit_segment_t *segment)
 Destroy jit segment segment.
 
void be_jit_set_entity_addr (ir_entity *entity, void const *address)
 Set absolute address of global entities so relocations in jit compiled code an be resolved.
 
void const * be_jit_get_entity_addr (ir_entity const *entity)
 Return previously set address.
 
ir_jit_function_tbe_jit_compile (ir_jit_segment_t *segment, ir_graph *irg)
 Compile graph irg to a sequence of machine instructions and relocations.
 
unsigned be_get_function_size (ir_jit_function_t const *function)
 Return the buffer size necessary to emit function with be_emit_function().
 
void be_emit_function (char *buffer, ir_jit_function_t *function)
 Emit function into buffer and resolve symbols and relocations.
 

Detailed Description

Provides interface to generate code and resolve symbols in memory buffers. This is often called just in time compilation.

Typedef Documentation

◆ ir_jit_function_t

Just in time compiled function with potentially unresolved relocations.

Definition at line 35 of file jit.h.

◆ ir_jit_segment_t

Just in time compilation environment.

Holds memory for several ir_jit_function_t.

Definition at line 30 of file jit.h.

Function Documentation

◆ be_destroy_jit_segment()

void be_destroy_jit_segment ( ir_jit_segment_t * segment)

Destroy jit segment segment.

Invalidates references to functions created in the segment.

◆ be_emit_function()

void be_emit_function ( char * buffer,
ir_jit_function_t * function )

Emit function into buffer and resolve symbols and relocations.

◆ be_get_function_size()

unsigned be_get_function_size ( ir_jit_function_t const * function)

Return the buffer size necessary to emit function with be_emit_function().

◆ be_jit_compile()

ir_jit_function_t * be_jit_compile ( ir_jit_segment_t * segment,
ir_graph * irg )

Compile graph irg to a sequence of machine instructions and relocations.

◆ be_jit_get_entity_addr()

void const * be_jit_get_entity_addr ( ir_entity const * entity)

Return previously set address.

See also
be_jit_set_entity_addr()

◆ be_jit_set_entity_addr()

void be_jit_set_entity_addr ( ir_entity * entity,
void const * address )

Set absolute address of global entities so relocations in jit compiled code an be resolved.

◆ be_new_jit_segment()

ir_jit_segment_t * be_new_jit_segment ( void )

Create a new jit segment.