6 #ifndef control_header_included
7 #define control_header_included
34 #ifndef CONTROL_INCLUDED
35 #define CONTROL_INCLUDED
41 #define USE_NEW_CONTROLIZER_ENV_VAR_NAME "PIPS_USE_NEW_CONTROLIZER"
43 #define USE_OLD_CONTROLIZER_ENV_VAR_NAME "PIPS_USE_OLD_CONTROLIZER"
void do_loop_to_while_loop(statement)
converts a doloop to a while loop, in place
void reset_ctrl_graph(void)
void full_control_graph(string)
FULL CONTROL GRAPH for module NAME.
void set_ctrl_graph(controlmap)
bool control_test_p(control)
Check that a node is used as a test in a CFG.
bool cycle_head_p(control, hash_table, hash_table)
This node is a cycle call site.
char vcid_control_old_controlizer[]
old_controlizer.c
bool ctrl_graph_undefined_p(void)
graph.c
statement take_out_the_exit_node_if_not_a_continue(statement)
Extract the statement from an exit node of an unstructured statement if it is a useful statement.
void simple_restructure_statement(statement)
A simple cleaning of the control graph without major topological restructuring.
bool unstructured_consistency_p(unstructured, bool)
cfg.c
void unspaghettify_or_restructure_statement(statement)
The entry point common to unspaghettify or restructure a module:
bool meaningless_control_p(control)
bourdoncle.c
bool unstructured_while_p(unstructured)
Test if an unstructured is found to be like a structured while-loop.
void restructure_statement(statement)
The real entry point of control graph restructuring:
void transform_a_for_loop_statement_into_a_while_loop(statement)
Same as above, but with no calls to ancestors.
bool true_successors_only_p(control)
bool controlizer(const char *)
The old controlizer user interface.
list control_list_to_statement_list(list)
of statement
bool false_successors_only_p(control)
void control_graph_recursive_decomposition(unstructured)
hierarchize.c
bool restructure_control(const string)
Try to simplify the control graph of a module by removing useless CONTINUEs, unreachable code,...
bool dowhile_to_while(const char *)
dowhile_to_while.c
bool guess_late_read_effect_on_entity(expression, entity)
for_to_do_or_while_loops.c
char vcid_control_controlizer[]
cproto-generated files
unstructured partition_to_unstructured(control, list)
Build a new unstructured (CFG) for partition.
control control_to_ancestor(control, hash_table)
If vertex is an ancestor control node from the input control graph, return vertex,...
controlmap get_ctrl_graph(void)
void fuse_sequences_in_unstructured(statement)
Try to transform each control sequence in a single statement instead of a list of control nodes:
void store_ctrl_graph(statement, control)
control control_shallow_copy(control)
bool for_loop_to_while_loop(const string)
For-loop to while-loop transformation phase.
void transform_a_for_loop_into_a_while_loop(forloop)
Try to to transform the C-like for-loops into Fortran-like do-loops.
bool unspaghettify(const string)
Try to simplify the control graph of a module by removing useless CONTINUEs, unreachable code.
void do_loop_to_for_loop(statement)
converts a doloop to a for loop, in place
void build_full_ctrl_graph(statement)
bool statement_reachable_p(statement)
Test if the given statement is reachable from some statements given at init_reachable(start)
void intersect_successors_with_partition_complement(control, list)
bool new_controlizer(const char *)
module.c
bool for_loop_to_do_loop(const string)
For-loop to do-loop transformation phase.
control delete_ctrl_graph(statement)
bool statement_continued_p(statement)
Test if the execution goes on after the given statement.
bool next_ctrl_graph_travel(statement *)
void init_ctrl_graph_travel(statement, bool(*)(statement))
void clean_ctrl_graph(void)
global mapping from statements to their control in the full control graph
void close_ctrl_graph(void)
control load_ctrl_graph(statement)
void init_ctrl_graph(void)
bool direct_cycle_head_p(control, hash_table)
This node is directly associated to a specific cycle.
void intersect_successors_with_partition(control, list)
unstructured cycle_head_to_scc(control, hash_table, hash_table)
The ancestor of this node is associated to a specific cycle.
bool bound_ctrl_graph_p(statement)
void bourdoncle_free(unstructured, hash_table, hash_table)
unstructured unstructured_shallow_copy(unstructured, hash_table)
void intersect_successors_with_partition_or_complement(control, list, bool)
If complement_p, preserve successors in the complement of partition.
sequence for_to_do_loop_conversion(forloop, statement)
Try to convert a C-like for-loop into a Fortran-like do-loop.
void store_or_update_ctrl_graph(statement, control)
void add_control_to_embedding_control_list(control)
unstructured proper_cycle_head_to_scc(control, hash_table)
Retrieve a scc_u from its head.
void close_ctrl_graph_travel(void)
int bourdoncle_visit(control, list *, hash_table, hash_table)
bool proper_cycle_head_p(control, hash_table)
This node is really the head of a cycle (red on daVinci pictures).
char vcid_unspaghettify[]
unspaghettify.c
list bourdoncle_partition(unstructured, unstructured *, hash_table *, hash_table *)
unstructured ancestor_cycle_head_to_scc(control, hash_table)
scc_map maps either the ancestor node to its scc if the transformers are computed without context,...
bool one_successor_kind_only_p(control, bool)
useful for non-deterministic control flow graph only
void close_reachable(void)
Remove reachability information about previously checked statements.
void update_ctrl_graph(statement, control)
list bourdoncle_component(control, hash_table, hash_table)
void try_to_transform_a_for_loop_into_a_do_loop(forloop)
Try to to transform the C-like for-loops into Fortran-like do-loops.
void error_reset_ctrl_graph(void)
sequence for_to_while_loop_conversion(expression, expression, expression, statement, extensions)
Build a sequence with a while-loop from for-loop parameters.
void unspaghettify_statement(statement)
The real entry point of unspaghettify:
statement unsugared_whileloop_header(statement)
void init_reachable(statement)
unreachable.c
statement loop_header(statement)
LOOP_HEADER, LOOP_TEST and LOOP_INC build the desugaring phases of a do-loop L for the loop header (i...
statement loop_test(statement)
bool controlize_statement(control, control, hash_table)
Controlize a statement that is in a control node, that is restructure it to have a HCFG recursively (...
unstructured control_graph(statement)
CONTROL_GRAPH returns the control graph of the statement ST.
statement forloop_header(statement)
control find_or_create_exit_control_node(list, control)
FI: remake of function above, incomplete backward approach, now obsolete because the forward approach...
statement forloop_inc(statement)
statement loop_inc(statement)
control find_exit_control_node(list, control)
Find the exit node of a sub-CFG defined by the list of nodes ctls and by the first node to execute wh...
statement forloop_test(statement)
statement hcfg(statement)
Compute the hierarchical control flow graph (HCFG) of a statement.
statement unsugared_forloop_inc(statement)
statement unsugared_loop_inc(statement)
Do an index increment instruction for do-loop unsugaring.
statement unsugared_loop_test(statement)
Do a crude test of end of do-loop for do-loop unsugaring.
statement unsugared_whileloop_test(statement)
statement unsugared_forloop_header(statement)
statement unsugared_forloop_test(statement)
statement unsugared_loop_header(statement)
LOOP_HEADER, LOOP_TEST and LOOP_INC build the desugaring phases of a do-loop L for the loop header (i...
The structure used to build lists in NewGen.