25 #include "pips_config.h"
41 #include "resources.h"
84 pips_debug(7,
"(%td,%td:%td) -> (%td,%td;%td)\n",
278 #ifndef bool_undefined
279 #define bool_undefined ((bool) (-15))
280 #define bool_undefined_p(b) ((b)==bool_undefined)
294 if (load_statement_stacked(s)!=
true)
297 store_statement_stacked(s,
true);
321 store_statement_stacked(s,
true);
327 while (!to_see_empty_p())
static void push_if_necessary(statement s)
static void push(list l)
it is pushed in reverse order to preserve the depth first view.
list control_list_to_statement_list(list lc)
of statement
static void push_successors(statement s)
static void stmt_rewrite(statement s)
static void add_arrow_in_ctrl_graph(statement s1, statement s2)
add (s1) --> (s2), that is s2 as successor of s1 and s1 as predecessor of s2.
static void add_arrows_in_ctrl_graph(statement s, list l)
bool next_ctrl_graph_travel(statement *ps)
static void statement_arrows(statement s, list next)
void clean_ctrl_graph()
global mapping from statements to their control in the full control graph
void close_ctrl_graph_travel(void)
static bool(* travel_decision)(statement)
Static data for the travel.
void init_ctrl_graph_travel(statement s, bool(*decision)(statement))
void build_full_ctrl_graph(statement s)
void full_control_graph(string name)
FULL CONTROL GRAPH for module NAME.
control make_control(statement a1, list a2, list a3)
struct _newgen_struct_statement_ * statement
static list blocks
lisp of loops
controlmap get_ctrl_graph(void)
void store_ctrl_graph(statement, control)
void close_ctrl_graph(void)
control load_ctrl_graph(statement)
void init_ctrl_graph(void)
bool bound_ctrl_graph_p(statement)
#define CONTROL_MAP(ctl, code, c, list)
Macro to walk through all the controls reachable from a given control node of an unstructured.
void gen_multi_recurse(void *o,...)
Multi recursion visitor function.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
#define ENDP(l)
Test if a list is empty.
#define NIL
The empty list (nil in Lisp)
list gen_once(const void *vo, list l)
Prepend an item to a list only if it is not already in the list.
list gen_copy_seq(list l)
Copy a list structure.
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
#define CAR(pcons)
Get the value of the first element of a list.
void gen_free_list(list l)
free the spine of the list
#define CDR(pcons)
Get the list less its first element.
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_internal_error
#define GENERIC_GLOBAL_FUNCTION(name, type)
#define GENERIC_LOCAL_MAPPING(name, result, type)
to allow mappings local to a file.
#define DEFINE_LOCAL_STACK(name, type)
#define ORDERING_NUMBER(o)
#define ORDERING_STATEMENT(o)
#define unstructured_control
After the modification in Newgen: unstructured = entry:control x exit:control we have create a macro ...
#define is_instruction_block
soft block->sequence transition
#define instruction_block(i)
#define instruction_loop_p(x)
#define control_predecessors(x)
#define CONTROLMAP_MAP(k, v, c, f)
#define instruction_loop(x)
#define statement_ordering(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define CONTROL(x)
CONTROL.
@ is_instruction_unstructured
@ is_instruction_whileloop
#define instruction_tag(x)
#define control_successors(x)
#define instruction_whileloop(x)
#define whileloop_body(x)
#define statement_instruction(x)
#define control_statement(x)
#define instruction_test(x)
#define statement_number(x)
#define instruction_unstructured(x)
#define statement_undefined
#define STATEMENT(x)
STATEMENT.
The structure used to build lists in NewGen.