PIPS
|
#include <stdio.h>
#include <string.h>
#include "linear.h"
#include "genC.h"
#include "misc.h"
#include "pipsdbm.h"
#include "ri.h"
#include "ri-util.h"
Go to the source code of this file.
Macros | |
#define | DV_SUFFIX ".daVinci" |
Functions | |
static void | node (FILE *out, string name) |
Build for module name a node and link to its successors. More... | |
static void | init_seen (void) |
static void | close_seen (void) |
static void | set_as_seen (string m) |
static bool | seen_p (string m) |
static void | recursive_append (FILE *out, string name) |
generates into "out" a davinci node for module "name", and recurse to its not yet seen callees. More... | |
bool | graph_of_calls (const string name) |
to be called by pipsmake. More... | |
bool | full_graph_of_calls (string name) |
To be called by pipsmake. More... | |
Variables | |
static hash_table | seen = hash_table_undefined |
static function to store whether a module has been seen during the recursive generation of the daVinci file. More... | |
static bool | first_seen = false |
|
static |
Definition at line 89 of file graph.c.
References hash_table_free(), hash_table_undefined, and seen.
Referenced by graph_of_calls().
To be called by pipsmake.
Generate a global resource, hence name is ignored.
build file name... and open it.
prolog, per module stuff, epilog.
close and clean...
put resulting resource into pipsdbm.
name | ame |
Definition at line 147 of file graph.c.
References concatenate(), db_build_file_resource_name(), db_get_current_workspace_directory(), db_get_module_list(), DB_PUT_FILE_RESOURCE, DV_SUFFIX, file_name, fprintf(), free(), full_name, gen_array_free(), gen_array_item(), gen_array_nitems(), node(), out, pips_debug, PROGRAM_RESOURCE_OWNER, safe_fclose(), safe_fopen(), and strdup().
to be called by pipsmake.
graph.c
builds the daVinci file for module "name".
do the job here.
name | ame |
Definition at line 120 of file graph.c.
References close_seen(), concatenate(), db_build_file_resource_name(), db_get_current_workspace_directory(), DB_PUT_FILE_RESOURCE, DV_SUFFIX, file_name, fprintf(), free(), full_name, init_seen(), out, recursive_append(), safe_fclose(), safe_fopen(), and strdup().
|
static |
Definition at line 87 of file graph.c.
References first_seen, hash_string, hash_table_make(), and seen.
Referenced by graph_of_calls().
|
static |
Build for module name a node and link to its successors.
It could be a per module resource, however the callgraph is not expected to change often, and we can avoid to manipulate the many small files.
lazy callees.
daVinci node prolog.
one edge per callee
node epilog
Definition at line 56 of file graph.c.
References callees_callees, db_get_memory_resource(), db_resource_p(), fprintf(), MAP, NIL, out, and STRING.
Referenced by __attribute__(), add_node_to_interval(), automatic_translation(), build_bdt_null(), build_creductions_of_statement(), build_reduction_of_variable(), display_interval_graph(), full_graph_of_calls(), interval_graph(), list_of_reduced_variables(), make_host_and_node_modules(), recursive_append(), and write_resulting_bdt().
|
static |
generates into "out" a davinci node for module "name", and recurse to its not yet seen callees.
else
the resource may not have been defined, for instance if the code was not parsed, because the ALL dependence is limited.
Definition at line 98 of file graph.c.
References callees_callees, db_get_memory_resource(), db_resource_p(), first_seen, fprintf(), MAP, node(), out, seen_p(), set_as_seen(), and STRING.
Referenced by graph_of_calls().
Definition at line 92 of file graph.c.
References hash_defined_p(), and seen.
Referenced by recursive_append().
|
static |
Definition at line 91 of file graph.c.
References hash_put(), and seen.
Referenced by recursive_append().
Definition at line 86 of file graph.c.
Referenced by init_seen(), and recursive_append().
|
static |
static function to store whether a module has been seen during the recursive generation of the daVinci file.
Definition at line 85 of file graph.c.
Referenced by base_append(), base_included_p(), base_union(), clean_enclosing_loops(), close_seen(), dag_fix_image_reuse(), davinci_dump_expression(), davinci_dump_expression_rc(), do_reduction_detection(), do_reduction_propagation(), gen_set_closure_iterate(), init_seen(), insert_before_current_statement(), propagate_constant_image_to_succs(), sc_to_minimal_basis(), seen_p(), set_as_seen(), shared_obj_in(), and vect_check().