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.
- static int check_invoke_type
- RT#48260: Not yet documented!!!
- void find_basic_blocks
- RT#48260: Not yet documented!!!
- static void bb_check_set_addr
- RT#48260: Not yet documented!!!
- void build_cfg
- Once the basic blocks have been computed,
build_cfg computes the dependencies between them.
- static void bb_findadd_edge
- find the placement of the label,
and link the two nodes
- int blocks_are_connected
- RT#48260: Not yet documented!!!
- static void bb_add_edge
- RT#48260: Not yet documented!!!
- static void bb_remove_edge
- RT#48260: Not yet documented!!!
- static void free_edge
- RT#48260: Not yet documented!!!
- int edge_count
- RT#48260: Not yet documented!!!
- void life_analysis
- RT#48260: Not yet documented!!!
- static void analyse_life_symbol
- RT#48260: Not yet documented!!!
- void free_life_info
- RT#48260: Not yet documented!!!
- static void analyse_life_block
- analyse_life_block studies the state of the var r in the block bb.
- Its job is to set the flags LF_use,
or LF_read,
and record the intervals inside the block where the var is alive.
- static void propagate_need
- RT#48260: Not yet documented!!!
- void compute_dominators
- Computes the dominators tree of the CFG.
Basic block A dominates B,
if each path to B passes through A
- s.
gcc:flow.c compute_dominators
- void compute_dominance_frontiers
- Algorithm to find dominance frontiers described in paper "A Simple,
Fast Dominance Algorithm",
Cooper et al.
(2001)
- static void free_dominators
- RT#48260: Not yet documented!!!
- static void free_dominance_frontiers
- RT#48260: Not yet documented!!!
- static void sort_loops
- RT#48260: Not yet documented!!!
- void find_loops
- Searches for loops in the CFG.
We search for edges that go from a node to one of its dominators.
- int natural_preheader
- For loop_info,
finds the natural preheader of the loop,
if any,
and returns its index,
otherwise returns -1.
A natural preheader exists if there is only one predecessor to the loop header outside of the loop body,
and if it always transfers control directly to the header.
- static void mark_loop
- Increases the loop_depth of all the nodes in a loop
- static void free_loops
- RT#48260: Not yet documented!!!
- void search_predecessors_not_in
- RT#48260: Not yet documented!!!
- static void init_basic_blocks
- RT#48260: Not yet documented!!!
- void clear_basic_blocks
- RT#48260: Not yet documented!!!
- static Basic_block *make_basic_block
- RT#48260: Not yet documented!!!
- Life_range *make_life_range
- RT#48260: Not yet documented!!!