|
libFirm 1.20
|
Entry point to the representation of a whole program. More...
#include <stddef.h>#include "firm_types.h"#include "irgraph.h"#include "begin.h"#include "end.h"Go to the source code of this file.
Enumerations | |
| enum | ir_segment_t { IR_SEGMENT_FIRST, IR_SEGMENT_GLOBAL = IR_SEGMENT_FIRST, IR_SEGMENT_THREAD_LOCAL, IR_SEGMENT_CONSTRUCTORS, IR_SEGMENT_DESTRUCTORS, IR_SEGMENT_LAST = IR_SEGMENT_DESTRUCTORS } |
| Segment. More... | |
| enum | irp_resources_t { IRP_RESOURCE_NONE = 0, IRP_RESOURCE_IRG_LINK = 1 << 0, IRP_RESOURCE_ENTITY_LINK = 1 << 1, IRP_RESOURCE_TYPE_VISITED = 1 << 2, IRP_RESOURCE_TYPE_LINK = 1 << 3 } |
| Resources usable by algorithms modifying the program. More... | |
Functions | |
| void | irp_reserve_resources (ir_prog *irp, irp_resources_t resources) |
| Reserve resources available for a whole program. | |
| void | irp_free_resources (ir_prog *irp, irp_resources_t resources) |
| Frees resources availabel for a whole program. | |
| irp_resources_t | irp_resources_reserved (const ir_prog *irp) |
| Returns currently reserved whole program resources. | |
| ir_prog * | get_irp (void) |
| Returns the current irp from where everything in the current module can be accessed. | |
| void | set_irp (ir_prog *irp) |
| Sets current irp. | |
| ir_prog * | new_ir_prog (const char *name) |
| Creates a new ir_prog (a module or compilation unit). | |
| void | free_ir_prog (void) |
| Frees all memory used by irp. | |
| void | set_irp_prog_name (ident *name) |
| Sets the file name / executable name or the like. | |
| int | irp_prog_name_is_set (void) |
| Returns true if the user ever set a program name. | |
| ident * | get_irp_ident (void) |
| Returns the name of the current irp. | |
| const char * | get_irp_name (void) |
| Returns the name of the current irp. | |
| ir_graph * | get_irp_main_irg (void) |
| Returns the main routine of the compiled program. | |
| void | set_irp_main_irg (ir_graph *main_irg) |
| Sets the main routine of the compiled program. | |
| void | add_irp_irg (ir_graph *irg) |
| Adds irg to the list of ir graphs in the current irp. | |
| void | remove_irp_irg_from_list (ir_graph *irg) |
| Removes irg from the list of irgs and shrinks the list by one. | |
| void | remove_irp_irg (ir_graph *irg) |
| Removes irg from the list of irgs, deallocates it and shrinks the list by one. | |
| size_t | get_irp_last_idx (void) |
| returns the biggest not used irg index number | |
| size_t | get_irp_n_irgs (void) |
| Returns the number of ir graphs in the irp. | |
| ir_graph * | get_irp_irg (size_t pos) |
| Returns the ir graph at position pos in the irp. | |
| void | set_irp_irg (size_t pos, ir_graph *irg) |
| Sets the ir graph at position pos. | |
| ir_type * | get_segment_type (ir_segment_t segment) |
| Returns the type containing the entities for a segment. | |
| void | set_segment_type (ir_segment_t segment, ir_type *new_type) |
| Changes a segment segment type for the program. | |
| ir_type * | get_glob_type (void) |
| Returns the "global" type of the irp. | |
| ir_type * | get_tls_type (void) |
| Returns the "thread local storage" type of the irp. | |
| size_t | get_irp_n_types (void) |
| Returns the number of all types in the irp. | |
| ir_type * | get_irp_type (size_t pos) |
| Returns the type at position pos in the irp. | |
| void | set_irp_type (size_t pos, ir_type *typ) |
| Overwrites the type at position pos with another type. | |
| ir_graph * | get_const_code_irg (void) |
| Returns the graph for global constants of the current irp. | |
| irg_phase_state | get_irp_phase_state (void) |
| The phase state for the program. | |
| void | set_irp_phase_state (irg_phase_state s) |
| Sets the phase state of the program. | |
| ir_prog_pass_t * | set_irp_phase_state_pass (const char *name, irg_phase_state state) |
| Creates an ir_prog pass for set_irp_phase_state(). | |
| irg_callee_info_state | get_irp_callee_info_state (void) |
| Returns callee info state for the whole program. | |
| void | set_irp_callee_info_state (irg_callee_info_state s) |
| Sets callee info state for the whole program. | |
| ir_label_t | get_irp_next_label_nr (void) |
| Returns a new, unique label number. | |
| void | add_irp_asm (ident *asm_string) |
| Add a new global asm include. | |
| size_t | get_irp_n_asms (void) |
| Returns the number of global asm includes. | |
| ident * | get_irp_asm (size_t pos) |
| Returns the global asm include at position pos. | |
| int | get_irp_optimization_dumps (void) |
| Returns whether optimization dump vcg graphs. | |
| void | enable_irp_optimization_dumps (void) |
| Enable vcg dumping of optimization. | |
Variables | |
| ir_prog * | irp |
| A variable pointing to the current irp (program or module). | |
Entry point to the representation of a whole program.
Intermediate Representation (IR) of a program.
Definition in file irprog.h.