| parrotcode: compilers/imcc/cfg.c | |
| Contents | Compilers |

compilers/imcc/cfg.c

A basic block is the longest sequence of instructions that we are sure will be executed sequentially: no branches, no labels.
The control-flow graph is a directed graph that reflects the flow of execution between blocks.

PARROT_WARN_UNUSED_RESULT static int check_invoke_type(PARROT_INTERP, ARGIN(const IMC_Unit *unit), ARGIN(const Instruction *ins))void find_basic_blocks(PARROT_INTERP, NOTNULL(struct _IMC_Unit *unit), int first)static void bb_check_set_addr(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(Basic_block *bb), NOTNULL(SymReg *label))void build_cfg(PARROT_INTERP, NOTNULL(struct _IMC_Unit *unit))static void bb_findadd_edge(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(Basic_block *from), NOTNULL(SymReg *label))PARROT_WARN_UNUSED_RESULT int blocks_are_connected(ARGIN(const Basic_block *from), ARGIN(const Basic_block *to))static void bb_add_edge(NOTNULL(IMC_Unit *unit), NOTNULL(Basic_block *from), NOTNULL(Basic_block *to))static void bb_remove_edge(NOTNULL(IMC_Unit *unit), NOTNULL(Edge *edge))static void free_edge(NOTNULL(IMC_Unit *unit))PARROT_WARN_UNUSED_RESULT int edge_count(ARGIN(const struct _IMC_Unit *unit))void life_analysis(PARROT_INTERP, ARGIN(const struct _IMC_Unit *unit))static void analyse_life_symbol(ARGIN(const struct _IMC_Unit *unit), NOTNULL(SymReg *r))void free_life_info(ARGIN(const struct _IMC_Unit *unit), NOTNULL(SymReg *r))static void analyse_life_block(NOTNULL(Basic_block *bb), NOTNULL(SymReg *r))static void propagate_need(NOTNULL(Basic_block *bb), NOTNULL(SymReg *r), int i)void compute_dominators(PARROT_INTERP, NOTNULL(struct _IMC_Unit *unit))void compute_dominance_frontiers(PARROT_INTERP, NOTNULL(struct _IMC_Unit *unit))static void free_dominators(NOTNULL(IMC_Unit *unit))static void free_dominance_frontiers(NOTNULL(IMC_Unit *unit))static void sort_loops(PARROT_INTERP, NOTNULL(IMC_Unit *unit))void find_loops(PARROT_INTERP, NOTNULL(struct _IMC_Unit *unit))PARROT_WARN_UNUSED_RESULT int natural_preheader(ARGIN(const struct _IMC_Unit *unit), ARGIN(const Loop_info *loop_info))static void mark_loop(PARROT_INTERP, NOTNULL(IMC_Unit *unit), ARGIN(const Edge *e))static void free_loops(NOTNULL(IMC_Unit *unit))void search_predecessors_not_in(ARGIN(const Basic_block *node), NOTNULL(Set *s))static void init_basic_blocks(NOTNULL(IMC_Unit *unit))void clear_basic_blocks(NOTNULL(struct _IMC_Unit *unit))PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT static Basic_block *make_basic_block(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(Instruction *ins))PARROT_MALLOC PARROT_CANNOT_RETURN_NULL Life_range *make_life_range(NOTNULL(SymReg *r), int idx)
|
|
|