PIPS
|
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdarg.h>
#include <stdlib.h>
#include <setjmp.h>
#include "genC.h"
#include "newgen_include.h"
#include "newgen_hash.h"
#include "genread.h"
Go to the source code of this file.
Data Structures | |
struct | driver |
The DRIVER structure is used to monitor the general function which traverses objects. More... | |
struct | gen_trav_env |
struct | gtt_t |
translation tables type... More... | |
struct | multi_recurse |
the current data needed for a multi recursion are stored in a multi recurse struct. More... | |
Macros | |
#define | GO (1) |
#define | gen_alloc_component(dp, cp, ap, gen_check_p) |
gen_alloc_component updates the gen_chunk CP from the arg list AP according to the domain DP. More... | |
#define | CHECK_NULL(obj, bp, dr) if((obj)==gen_chunk_undefined) {(*(dr)->null)(bp) ; return ;} |
To be called on any object pointer. More... | |
#define | MAX_SHARED_OBJECTS 10000 |
These functions computes an hash table of object pointers (to be used to manage sharing when dealing with objects). More... | |
#define | FIRST_SEEN(s) ((s)>=first_seen && (s)<first_seen+MAX_SHARED_OBJECTS) |
#define | MAX_GEN_TRAV_ENV 100 |
GEN_TRAV_ENVS are stacked to allow recursive calls to GEN_TRAV_OBJ (cf. More... | |
#define | COPYABLE_DOMAIN(d) |
COPY_OBJ_OUT achieves to update the new object (copy of the old one) once all sub-domains have been recursively copied. More... | |
#define | decision_table_undefined ((char)25) |
GLOBAL VARIABLES: to deal with decision tables. More... | |
Typedefs | |
typedef struct gtt_t * | gtt_p |
typedef char | GenDecisionTableType[MAX_DOMAIN] |
typedef GenDecisionTableType | gen_tables[MAX_DOMAIN] |
typedef bool(* | GenFilterType) () |
typedef void(* | GenRewriteType) () |
typedef GenFilterType | GenFilterTableType[MAX_DOMAIN] |
typedef GenRewriteType | GenRewriteTableType[MAX_DOMAIN] |
Functions | |
void | newgen_start_lexer (FILE *) |
starting the scanner. More... | |
int | gen_type (gen_chunk *obj) |
GEN_TYPE returns the domain number for the object in argument. More... | |
string | gen_domain_name (int t) |
GEN_DOMAIN_NAME returns the domain name, and may be used for debug purposes. More... | |
int | newgen_domain_index (gen_chunk *obj) |
DOMAIN_INDEX returns the index in the Domain table for object OBJ. More... | |
static void | fprintf_spaces (fd, number) |
FPRINTF_SPACES prints NUMBER spaces on the FD file descriptor. More... | |
static int | array_size (dim) |
ARRAY_SIZE returns the number of elements in the array whose dimension list is DIM. More... | |
static gen_chunk * | init_array (union domain *dp) |
INIT_ARRAY returns a freshly allocated array initialized according to the information in its domain DP. More... | |
static int | array_own_allocated_memory (union domain *dp) |
static void | gen_alloc_constructed (va_list ap, struct gen_binding *bp, union domain *dp, gen_chunk *cp, int data, int gen_check_p) |
GEN_ALLOC allocates SIZE bytes to implement an object whose TYPE is the index in the Domains table. More... | |
gen_chunk * | gen_alloc (int size, int gen_check_p, int dom,...) |
allocates something in newgen. More... | |
static void | gen_trav_obj () |
static void | gen_trav_leaf (struct gen_binding *bp, gen_chunk *obj, struct driver *dr) |
set to true to stop... More... | |
static void | gen_trav_simple (union domain *dp, gen_chunk *obj, struct driver *dr) |
GEN_TRAV_SIMPLE traverses a simple OBJ (which is a (CONS *) for a list or points to the first element of an array) of type DP according to the driver DR. More... | |
static void | gen_array_leaf (struct gen_binding *bp, int i, gen_chunk *obj, struct driver *dr) |
GEN_ARRAY_LEAF is the default recursive call to gen_trav_leaf. More... | |
static void | gen_trav_obj_constructed (gen_chunk *obj, __attribute__((unused)) struct gen_binding *bp, union domain *dp, int data, struct driver *dr) |
GEN_TRAV_OBJ (the root function) traverses the object OBJ according to the driver DR. More... | |
static void | gen_trav_obj (gen_chunk *obj, struct driver *dr) |
"driver" driven recursion in newgen data structures. More... | |
static int | tabulated_leaf_in (gen_chunk *obj, struct gen_binding *bp) |
int | current_shared_obj_table_size (void) |
returns the number of byte allocated for obj_table. More... | |
static int | shared_obj_in (gen_chunk *obj, struct driver *dr) |
SHARED_OBJ_IN introduces an object OBJ in the OBJ_TABLE. More... | |
static int | shared_simple_in (obj, dp) |
static void | shared_pointers (obj, keep) |
SHARED_POINTERS creates (in OBJ_TABLE) the association between objects and their numbers (!= 0 if sharing). More... | |
static int | shared_obj (obj, void(*first)(), void(*others)()) |
SHARED_OBJ manages the OBJect modulo sharing (the OBJ_TABLE has to be set first, see above). More... | |
static void | push_gen_trav_env () |
static void | pop_gen_trav_env () |
static bool | free_already_seen_p (gen_chunk *obj) |
static int | free_leaf_in (gen_chunk *obj, struct gen_binding *bp) |
A tabulated domain BP prohibits its OBJ to be recursively freed. More... | |
static void | free_leaf_out (obj, bp) |
FREE_LEAF_OUT manages external types. More... | |
static void | free_simple_out (gen_chunk *obj, union domain *dp) |
FREE_SIMPLE_OUT frees the spine of the list OBJ or the whole array (according to the type DP). More... | |
static void | free_obj_out (gen_chunk *obj, struct gen_binding *bp, struct driver *dr) |
FREE_OBJ_OUT just frees the object OBJ. More... | |
static int | persistant_simple_in (obj, dp) |
GEN_LOCAL_FREE frees the object OBJ with or without KEEPing the sharing. More... | |
static int | free_obj_in (gen_chunk *obj, struct driver *dr) |
void | gen_free (gen_chunk *obj) |
version without shared_pointers. More... | |
void | gen_full_free_list (list l) |
static gen_chunk * | copy_hsearch (gen_chunk *key) |
maps an object on its copy More... | |
static void | copy_hput (hash_table t, char *k, char *v) |
static int | copy_obj_in (gen_chunk *obj, __attribute__((unused)) struct driver *dr) |
COPY_OBJ_IN duplicates an object if it has not already been seen (this migth happen with shared objects). More... | |
static int | copy_simple_in (gen_chunk *obj, union domain *dp) |
Just check for defined simple domains. More... | |
static void | copy_leaf_out (obj, bp) |
COPY_LEAF_OUT manages external sub-domains. More... | |
static list | gen_copy_list (list old_l, union domain *dp) |
GEN_COPY_LIST duplicates cons cells. More... | |
static gen_chunk * | gen_copy_array (gen_chunk *old_a, dp) |
GEN_COPY_ARRAY duplicates an array. More... | |
static set | gen_copy_set (set old_s, dp) |
GEN_COPY_SET duplicates a set. More... | |
static void | copy_simple_out (obj, dp) |
COPY_SIMPLE_OUT copies the spine of the list OBJ or the whole array (according to the type DP). More... | |
static void | copy_obj_out_constructed (gen_chunk *obj, struct gen_binding *bp, dp, data, new_obj, dr) |
static void | copy_obj_out (obj, bp, dr) |
static gen_chunk * | gen_local_copy_tree (gen_chunk *obj, bool keep) |
GEN_COPY_TREE makes a copy of the object OBJ. More... | |
gen_chunk * | gen_copy_tree (gen_chunk *obj) |
gen_chunk * | gen_copy_tree_with_sharing (gen_chunk *obj) |
for re-entry only in gen_copy_tree... More... | |
int | gen_free_tabulated (int domain) |
free tabulated elements of this domain. More... | |
static void | fputi (int i, FILE *f) |
static void | fputci (char c, int i, FILE *f) |
static void | write_define_shared_node (int n) |
WRITE_DEFINE_SHARED_NODE defines the node whose number is N. More... | |
static void | write_shared_node (int n) |
WRITE_SHARED_NODE references a shared node N. More... | |
static void | write_null (struct gen_binding *bp) |
static int | write_obj_in (gen_chunk *obj, struct driver *dr) |
WRITE_OBJ_IN writes the OBJect of type BP. More... | |
static void | write_obj_out (gen_chunk *obj, struct gen_binding *bp, struct driver *dr) |
WRITE_OBJ_OUT is done when the OBJect (of type BP) has been printed. More... | |
static void | write_string (string init, string s, string end, string ifnull, string ifundefined) |
static int | write_leaf_in (gen_chunk *obj, struct gen_binding *bp) |
WRITE_LEAF_IN prints the OBJect of type BP. More... | |
static int | write_simple_in (obj, dp) |
WRITE_SIMPLE_IN is done before printing a simple OBJect of type DP. More... | |
static void | write_array_leaf (struct gen_binding *bp, int i, gen_chunk *obj, struct driver *dr) |
WRITE_ARRAY_LEAF only writes non-null elements, in a sparse way. More... | |
static void | write_simple_out (gen_chunk *obj, union domain *dp) |
WRITE_LEAF_OUT prints the closing parenthesis of (non-basis) simple OBJect of type DP. More... | |
void | gen_write (FILE *fd, gen_chunk *obj) |
GEN_WRITE writes the OBJect on the stream FD. More... | |
void | gen_write_without_sharing (fd, obj) |
GEN_WRITE_WITHOUT_SHARING writes the OBJect on the stream FD. More... | |
static int | write_tabulated_leaf_in (gen_chunk *obj, struct gen_binding *bp) |
WRITE_TABULATED_LEAF_IN prints the OBJect of type BP. More... | |
static void | write_this_tabulated (gen_chunk *o) |
static void | change_sign (gen_chunk *o) |
int | gen_write_tabulated (FILE *fd, int domain) |
GEN_WRITE_TABULATED writes the tabulated object TABLE on FD. More... | |
string | gen_read_string (FILE *file, char upto) |
returns the allocated line read, whatever its length. More... | |
static gtt_p | gtt_make (void) |
returns an allocated and initialized translation table... More... | |
static void | gtt_table_init (gtt_p table) |
static void | gtt_table_identity (gtt_p table) |
static int | get_domain_number (string name, int i) |
== simplified lookup? returns the index of domain name if found, looking up from i. More... | |
static int | first_available (int t[MAX_DOMAIN]) |
static gtt_p | gtt_read (string filename) |
read and setup a table from a file More... | |
static void | gtt_write (string filename, gtt_p table) |
writes what the previous reads... More... | |
int | gen_type_translation_old_to_actual (int n) |
forwards conversion More... | |
int | gen_type_translation_actual_to_old (int n) |
backwards conversion More... | |
void | gen_type_translation_reset (void) |
void | gen_type_translation_default (void) |
void | gen_type_translation_read (string filename) |
set current type translation table according to file More... | |
void | gen_type_translation_write (string filename) |
static void | init_gen_quick_recurse_tables (void) |
GEN_READ_SPEC reads the specifications. More... | |
void | genspec_set_string_to_parse (char *) |
void | genspec_reset_string_to_parse (void) |
void | genspec_lex_destroy () |
void | gen_read_spec (char *spec,...) |
void | gen_init_external (int which, void *(*read)(FILE *, int(*)(void)), void(*write)(FILE *, void *), void(*free)(void *), void *(*copy)(void *), int(*allocated_memory)(void *)) |
GEN_INIT_EXTERNAL defines entry points for free, read and write functions of external types. More... | |
gen_chunk * | gen_make_array (num) |
GEN_MAKE_ARRAY allocates an initialized array of NUM gen_chunks. More... | |
gen_chunk * | gen_read (FILE *file) |
GEN_READ reads any object from the FILE stream. More... | |
int | gen_read_tabulated (FILE *file, int create_p) |
GEN_READ_TABULATED reads FILE to update the Gen_tabulated_ table. More... | |
gen_chunk * | gen_check (gen_chunk *obj, int t) |
GEN_CHECK checks that the gen_chunk received OBJ is of the appropriate TYPE. More... | |
static void | open_black_hole () |
int | gen_consistent_p (gen_chunk *obj) |
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ. More... | |
static void | void_gen_consistent_p (gen_chunk *obj) |
for side effects only More... | |
int | gen_tabulated_consistent_p (int domain) |
static void | defined_null (struct gen_binding *bp) |
GEN_DEFINED_P checks that the OBJect is fully defined. More... | |
int | gen_defined_p (gen_chunk *obj) |
static bool | check_sharing (char *p, char *type) |
static int | sharing_obj_in (gen_chunk *obj, struct driver *dr) |
static int | sharing_simple_in (gen_chunk *obj, union domain *dp) |
bool | gen_sharing_p (gen_chunk *obj1, gen_chunk *obj2) |
static bool | allocated_memory_already_seen_p (gen_chunk *obj) |
true if obj was already seen in this recursion, and put it at true More... | |
static int | allocated_memory_leaf_in (obj, bp) |
manages EXTERNALS and INLINABLES More... | |
static int | allocated_memory_obj_in (gen_chunk *obj, struct driver *dr) |
manages newgen objects and strings... More... | |
static int | allocated_memory_simple_in (gen_chunk *obj, union domain *dp) |
manages newgen simples (list, set, array) More... | |
int | gen_allocated_memory (gen_chunk *obj) |
re-entry is automatic for this function. More... | |
void | gen_null (__attribute__((unused)) void *unused) |
Ignore the argument. More... | |
void | gen_null2 (__attribute__((unused)) void *u1, __attribute__((unused)) void *u2) |
idem with 2 args, to please overpeaky compiler checks More... | |
void * | gen_NULL (__attribute__((unused)) void *unused) |
idem with a void* return More... | |
void * | gen_NULL2 (__attribute__((unused)) void *u1, __attribute__((unused)) void *u2) |
idem with 2 args, to please overpeaky compiler checks More... | |
bool | gen_true (__attribute__((unused)) gen_chunk *unused) |
Return true and ignore the argument. More... | |
bool | gen_true2 (__attribute__((unused)) gen_chunk *u1, __attribute__((unused)) void *u2) |
bool | gen_false (__attribute__((unused)) gen_chunk *unused) |
Return false and ignore the argument. More... | |
bool | gen_false2 (__attribute__((unused)) gen_chunk *u1, __attribute__((unused)) void *u2) |
void * | gen_identity (const void *x) |
Just return the argument. More... | |
void * | gen_chunk_identity (gen_chunk x) |
void | gen_core (__attribute__((unused)) void *p) |
Abort when called. More... | |
void * | gen_core_NULL (__attribute__((unused)) void *p) |
static void | print_decision_table (GenDecisionTableType t) |
static void | initialize_domain_DecisionTables (int domain) |
demand driven computation of the decision table to scan domain. More... | |
static void | initialize_domain_DirectDomainsTable (int target, union domain *dp) |
walks thru the domain to tag all types for target. More... | |
static void | initialize_DirectDomainsTable (void) |
static void | initialize_DecisionTables () |
static GenDecisionTableType * | get_decision_table (int domain) |
returns a decision table for the given domain. More... | |
static bool | quick_multi_already_seen_p (gen_chunk *obj) |
true if obj was already seen in this recursion. More... | |
static int | quick_multi_recurse_obj_in (gen_chunk *obj, __attribute__((unused)) struct driver *dr) |
static void | quick_multi_recurse_obj_out (gen_chunk *obj, __attribute__((unused)) struct gen_binding *bp, __attribute__((unused)) struct driver *dr) |
static int | quick_multi_recurse_simple_in (gen_chunk *obj, union domain *dp) |
void | gen_recurse_stop (void *obj) |
Tells the recursion not to go in this object. More... | |
static void | gen_internal_context_multi_recurse (void *o, void *context, bool gointabs, va_list pvar) |
Multi recursion generic visitor function. More... | |
void | gen_context_multi_recurse (void *o, void *context,...) |
Multi-recursion with context function visitor. More... | |
void | gen_full_recurse (void *o, void *context,...) |
Full multi-recursion with context function visitor. More... | |
void | gen_multi_recurse (void *o,...) |
Multi recursion visitor function. More... | |
void | gen_recurse (void *obj, int domain, bool(*filter)(void *encountered), void(*rewrite)(void *encountered_object)) |
Visit all the objects from a given types found in an object. More... | |
void | gen_context_recurse (void *obj, void *context, int domain, bool(*filter)(void *encountered_object, void *context), void(*rewrite)(void *encountered_object, void *context)) |
Visit all the objects from a given types found in an object with a context. More... | |
gen_chunk * | gen_get_recurse_previous_visited_object (void) |
Get the previously visited object. More... | |
gen_chunk * | gen_get_recurse_current_ancestor (void) |
Get the ancestor of the current object. More... | |
gen_chunk * | gen_get_recurse_ancestor (const void *object) |
Get the first ancestor object encountered during the recursion for the given object. More... | |
gen_chunk * | gen_get_ancestor (int type, const void *obj) |
return the first ancestor object found of the given type. More... | |
gen_chunk * | gen_get_current_object (void) |
return the current visited object, or NULL if not in a recursion. More... | |
gen_chunk * | gen_get_current_ancestor (int type) |
Return current object of that type... More... | |
Variables | |
FILE * | genspec_in |
lex files More... | |
FILE * | genspec_out |
struct gen_binding * | Tabulated_bp |
pointer to tabulated domain hack More... | |
int | Read_spec_mode |
extern int Current_first ; More... | |
static bool | Read_spec_performed = false |
int | gen_debug = 0 |
The debug flag can be changed by the user to check genClib code. More... | |
static int | gen_debug_indent = 0 |
static int | disallow_undefined_tabulated = true |
Default option in GEN_WRITE. More... | |
static bool | gen_trav_stop_recursion = false |
static char * | first_seen = (char *)NULL |
static char * | seen_once = (char *)NULL |
static hash_table | obj_table = (hash_table)NULL |
The OBJ_TABLE maps objects to addresses within the arrays FIRST_SEEN and SEEN_ONCE. More... | |
static int | shared_number = 0 |
The running counter of shared objects number. More... | |
static int | gen_trav_env_top = 0 |
struct gen_trav_env | gen_trav_envs [MAX_GEN_TRAV_ENV] |
static __thread hash_table | free_already_seen = (hash_table) NULL |
These functions are used to implement the freeing of objects. More... | |
static hash_table | copy_table = NULL |
These functions are used to implement the copying of objects. More... | |
static FILE * | user_file |
These functions implements the writing of objects. More... | |
static struct gen_binding * | wtt_bp = NULL |
static struct driver * | wtt_dr = NULL |
static gtt_p | gtt_current_table = NULL |
global translation table. More... | |
int | error_seen |
Have we seen a user error somewhere ? More... | |
static FILE * | black_hole = NULL |
used for consistence checking... More... | |
static bool | cumulated_error_seen |
static hash_table | pointers = (hash_table)NULL |
GEN_SHARING_P checks whether OBJ1 uses objects (except tabulated) or CONS cells that appear in OBJ2. More... | |
static jmp_buf | env |
static int | current_size |
returns the number of bytes allocated for a given structure may need additional fonctions for externals... More... | |
static hash_table | already_seen_objects = NULL |
static int | number_of_domains = -1 |
static gen_tables | DirectDomainsTable |
static gen_tables | DecisionTables |
static struct multi_recurse * | current_mrc = (struct multi_recurse *) NULL |
the current multi recurse driver. More... | |
#define CHECK_NULL | ( | obj, | |
bp, | |||
dr | |||
) | if((obj)==gen_chunk_undefined) {(*(dr)->null)(bp) ; return ;} |
#define COPYABLE_DOMAIN | ( | d | ) |
COPY_OBJ_OUT achieves to update the new object (copy of the old one) once all sub-domains have been recursively copied.
#define decision_table_undefined ((char)25) |
GLOBAL VARIABLES: to deal with decision tables.
number_of_domains: the number of domains managed by newgen, max is MAX_DOMAIN.
DirectDomainsTable: DirectDomainsTable[domain_1, domain_2] is true if domain_2 may contains directly a domain_1 field.
DecisionTables: DecisionTables[domain] is the decision table to scan domain. They are to be computed/set up after specifications' load. A demand driven approach is implemented.
#define FIRST_SEEN | ( | s | ) | ((s)>=first_seen && (s)<first_seen+MAX_SHARED_OBJECTS) |
#define gen_alloc_component | ( | dp, | |
cp, | |||
ap, | |||
gen_check_p | |||
) |
gen_alloc_component updates the gen_chunk CP from the arg list AP according to the domain DP.
It is now a macro to be able to update the va_list ap from gen_alloc_constructed and respect the C norm. It should work both on x86 and x86_64...
static void gen_alloc_component(union domain * dp, gen_chunk * cp, va_list ap, int gen_check_p)
#define MAX_GEN_TRAV_ENV 100 |
#define MAX_SHARED_OBJECTS 10000 |
typedef GenDecisionTableType gen_tables[MAX_DOMAIN] |
typedef char GenDecisionTableType[MAX_DOMAIN] |
typedef GenFilterType GenFilterTableType[MAX_DOMAIN] |
typedef GenRewriteType GenRewriteTableType[MAX_DOMAIN] |
true if obj was already seen in this recursion, and put it at true
Definition at line 2567 of file genClib.c.
References already_seen_objects, hash_get(), and hash_put().
Referenced by allocated_memory_leaf_in(), and allocated_memory_obj_in().
|
static |
manages EXTERNALS and INLINABLES
under approximation!
Definition at line 2579 of file genClib.c.
References domain::allocated_memory, allocated_memory_already_seen_p(), current_size, gen_binding::domain, domain::ex, GO, IS_EXTERNAL, IS_INLINABLE, IS_TABULATED, gen_binding::name, gen_chunk::p, gen_chunk::s, string_undefined_p, and user().
Referenced by gen_allocated_memory().
manages newgen objects and strings...
gen size is quite slow. should precompute sizes...
Definition at line 2612 of file genClib.c.
References allocated_memory_already_seen_p(), current_size, Domains, gen_size(), GO, IS_INLINABLE, IS_TABULATED, message_assert, and quick_domain_index.
Referenced by gen_allocated_memory().
manages newgen simples (list, set, array)
!GO ???
just to avoid a gcc warning
Definition at line 2634 of file genClib.c.
References ARRAY_DT, array_own_allocated_memory(), array_undefined_p, domain::ba, BASIS_DT, current_size, fatal(), GO, i2a(), gen_chunk::l, LIST_DT, list_own_allocated_memory(), list_undefined_p, gen_chunk::p, domain::persistant, SET_DT, set_own_allocated_memory(), set_undefined_p, gen_chunk::t, and domain::type.
Referenced by gen_allocated_memory().
Definition at line 181 of file genClib.c.
References domain::ar, array_size(), and domain::dimensions.
Referenced by allocated_memory_simple_in().
|
static |
ARRAY_SIZE returns the number of elements in the array whose dimension list is DIM.
Definition at line 155 of file genClib.c.
Referenced by array_own_allocated_memory(), common_region_translation(), dump_common_layout(), gen_copy_array(), gen_trav_simple(), gfc2pips_namespace(), init_array(), print_common_layout(), write_simple_in(), and zeroing_multiple_edges().
|
static |
Definition at line 1858 of file genClib.c.
Referenced by gen_write_tabulated().
|
static |
NOTREACHED
Definition at line 2475 of file genClib.c.
References env, hash_get(), HASH_UNDEFINED_VALUE, pointers, and user().
Referenced by sharing_obj_in(), and sharing_simple_in().
|
static |
Definition at line 1070 of file genClib.c.
References hash_put(), and HASH_UNDEFINED_VALUE.
Referenced by copy_leaf_out(), copy_obj_in(), copy_simple_in(), and copy_simple_out().
maps an object on its copy
special cases...
Definition at line 1053 of file genClib.c.
References copy_table, fatal(), hash_get(), HASH_UNDEFINED_VALUE, and string_undefined_p.
Referenced by copy_obj_out(), copy_obj_out_constructed(), gen_copy_array(), gen_copy_list(), gen_copy_set(), and gen_local_copy_tree().
|
static |
COPY_LEAF_OUT manages external sub-domains.
warning: the test IS_EXTERNAL cannot be applied on an inlined sub-domain
Definition at line 1149 of file genClib.c.
References domain::copy, copy_hput(), copy_table, gen_binding::domain, domain::ex, hash_defined_p(), IS_EXTERNAL, IS_INLINABLE, gen_binding::name, return(), gen_chunk::s, strdup(), string_undefined_p, and user().
Referenced by gen_local_copy_tree().
|
static |
COPY_OBJ_IN duplicates an object if it has not already been seen (this migth happen with shared objects).
inlined sub-domains are copied by the call to memcpy. remaining sub-domains require further processing
if (shared_obj( obj, gen_null, gen_null )) return 0;
memory is allocated to duplicate the object referenced by obj
thus content is copied, thus no probleme with inlined and so and newgen domain number.
hash table copy_table is updated
Definition at line 1086 of file genClib.c.
References alloc(), copy_hput(), copy_table, Domains, gen_size(), hash_defined_p(), quick_domain_index, and gen_binding::size.
Referenced by gen_local_copy_tree().
|
static |
Definition at line 1361 of file genClib.c.
References ARRAY_DT, domain::ba, CONSTRUCTED_DT, copy_hsearch(), copy_obj_out_constructed(), gen_binding::domain, fatal(), i2a(), IS_TABULATED, LIST_DT, SET_DT, and domain::type.
Referenced by gen_local_copy_tree().
|
static |
Definition at line 1305 of file genClib.c.
References AND_OP, ARROW_OP, domain::co, domain::components, copy_hsearch(), COPYABLE_DOMAIN, cp, fatal(), domain::first, HASH_MAP, hash_put(), hash_table_make(), hash_table_type(), i2a(), message_assert, domain::op, and OR_OP.
Referenced by copy_obj_out().
Just check for defined simple domains.
persistent arcs are put as copy of themself...
just to avoid a gcc warning
Definition at line 1117 of file genClib.c.
References ARRAY_DT, array_undefined, domain::ba, BASIS_DT, copy_hput(), copy_table, fatal(), i2a(), gen_chunk::l, LIST_DT, list_undefined, gen_chunk::p, domain::persistant, SET_DT, set_undefined, gen_chunk::t, and domain::type.
Referenced by gen_local_copy_tree().
|
static |
COPY_SIMPLE_OUT copies the spine of the list OBJ or the whole array (according to the type DP).
The components are copied by the recursive traversal functions
spine of the list is duplicated and hash table copy_table is updated
array is duplicated and hash table copy_table is updated
Definition at line 1271 of file genClib.c.
References ARRAY_DT, domain::ba, copy_hput(), copy_table, gen_copy_array(), gen_copy_list(), gen_copy_set(), gen_chunk::l, LIST_DT, gen_chunk::p, SET_DT, gen_chunk::t, and domain::type.
Referenced by gen_local_copy_tree().
int current_shared_obj_table_size | ( | void | ) |
returns the number of byte allocated for obj_table.
for debug
for FI and debugging purposes... FC
Definition at line 654 of file genClib.c.
References hash_table_own_allocated_memory(), and obj_table.
Referenced by rice_dependence_graph().
|
static |
GEN_DEFINED_P checks that the OBJect is fully defined.
Definition at line 2429 of file genClib.c.
References gen_binding::domain, fprintf(), print_domain(), and user().
Referenced by gen_defined_p().
Definition at line 2007 of file genClib.c.
References MAX_DOMAIN.
Referenced by gtt_read().
|
static |
FPRINTF_SPACES prints NUMBER spaces on the FD file descriptor.
`
limited indentation
Definition at line 118 of file genClib.c.
References fprintf().
Referenced by gen_trav_leaf(), gen_trav_obj(), and gen_trav_simple().
|
static |
Definition at line 1492 of file genClib.c.
Referenced by write_define_shared_node(), write_leaf_in(), write_obj_in(), write_shared_node(), and write_simple_in().
|
static |
Definition at line 1487 of file genClib.c.
References f(), and fprintf().
Referenced by fputci(), gen_write(), gen_write_tabulated(), write_array_leaf(), write_leaf_in(), and write_obj_in().
else seen for next time !
Definition at line 851 of file genClib.c.
References free_already_seen, hash_get(), hash_put(), and message_assert.
Referenced by free_obj_in().
|
static |
A tabulated domain BP prohibits its OBJ to be recursively freed.
&& !free_already_seen_p(obj)
???
Definition at line 867 of file genClib.c.
References IS_TABULATED, and message_assert.
Referenced by gen_free().
|
static |
FREE_LEAF_OUT manages external types.
is it a string with some allocated value?
Definition at line 876 of file genClib.c.
References gen_binding::domain, domain::ex, domain::free, IS_EXTERNAL, IS_INLINABLE, gen_binding::name, newgen_free, return(), gen_chunk::s, string_undefined_p, and user().
Referenced by gen_free().
Definition at line 971 of file genClib.c.
References Domains, free_already_seen_p(), gen_clear_tabulated_element(), gen_chunk::i, IS_TABULATED, and message_assert.
Referenced by gen_free().
|
static |
FREE_OBJ_OUT just frees the object OBJ.
static gen_chunk freed_gen_chunk ;
shouldn't this be done by hash_table_free ?
gen_free_area(obj->p, SIZE NOT DIRECTLY AVAILABLE);
Definition at line 922 of file genClib.c.
References ARROW_OP, domain::co, CONSTRUCTED_DT, gen_binding::domain, HASH_MAP, hash_table_free(), IS_TABULATED, message_assert, newgen_free, NEWGEN_FREED, domain::op, and gen_chunk::p.
Referenced by gen_free().
FREE_SIMPLE_OUT frees the spine of the list OBJ or the whole array (according to the type DP).
The components are (obviously ?) freed by the recursive traversal functions (I said it once ... and for all).
??? where is the size of the array?
Definition at line 901 of file genClib.c.
References ARRAY_DT, domain::ba, gen_free_list(), gen_chunk::l, LIST_DT, newgen_free, gen_chunk::p, SET_DT, set_free(), gen_chunk::t, and domain::type.
Referenced by gen_free().
allocates something in newgen.
Definition at line 298 of file genClib.c.
References alloc(), ARRAY_DT, domain::ba, check_read_spec_performed, CONSTRUCTED_DT, cp, gen_binding::domain, Domains, fatal(), gen_alloc_constructed(), gen_enter_tabulated(), HASH_OFFSET, i2a(), init_array(), IS_TABULATED, LIST_DT, message_assert, SET_DT, gen_binding::size, and domain::type.
Referenced by make_abc_checked(), make_action(), make_action_kind(), make_alias_association(), make_alias_associations(), make_align(), make_alignmap(), make_alignment(), make_application(), make_approximation(), make_area(), make_array_dimension_checked(), make_assignment(), make_atom(), make_attachee(), make_attachment(), make_attachments(), make_basic(), make_bdt(), make_bound_pair(), make_c_parser_context(), make_call(), make_call_site(), make_callees(), make_cast(), make_cell(), make_cell_interpretation(), make_cell_relation(), make_cell_relations(), make_chain(), make_clone_context(), make_code(), make_communication(), make_comp_desc(), make_comp_desc_set(), make_comp_sec(), make_complexity(), make_conditional(), make_cone(), make_conflict(), make_constant(), make_context_info(), make_control(), make_controlmap(), make_dad_struct(), make_dag(), make_dagvtx(), make_data(), make_data_status(), make_database(), make_dataflow(), make_dataval(), make_datavar(), make_db_owned_resources(), make_db_resource(), make_db_resources(), make_db_status(), make_db_symbol(), make_descriptor(), make_dfg_arc_label(), make_dfg_vertex_label(), make_dg_arc_label(), make_dg_vertex_label(), make_dimension(), make_dimension_checked(), make_distribute(), make_distributemap(), make_distribution(), make_dummy(), make_dynamic_check(), make_dynamic_status(), make_effect(), make_effects(), make_effects_classes(), make_entities(), make_entity(), make_entity_effects(), make_entity_entities(), make_entity_int(), make_entity_status(), make_entity_task_buffers(), make_entity_to_entity(), make_entitymap(), make_equivalences(), make_evaluation(), make_execution(), make_expression(), make_expressionwithlevel(), make_extension(), make_extensions(), make_forloop(), make_formal(), make_function(), make_functional(), make_gap(), make_gexpression(), make_graph(), make_hpf_newdecl(), make_hpf_newdecls(), make_hpfc_reductions(), make_hpfc_status(), make_ifcount(), make_instruction(), make_interpreted_cell(), make_interval_vertex_label(), make_language(), make_leaf_label(), make_lexpressionwithlevel(), make_lisp_expression(), make_loop(), make_makefile(), make_map_effect_bool(), make_map_effect_step_point(), make_map_entity_int(), make_match(), make_matchTree(), make_matchTreeSons(), make_memory_mapping(), make_message(), make_mode(), make_multitest(), make_newdeclmap(), make_normalized(), make_numbers_status(), make_opcode(), make_opcodeClass(), make_operator_id_tree(), make_overlap(), make_overlapsmap(), make_owner(), make_parameter(), make_path_selector(), make_path_selectors(), make_pattern(), make_patternArg(), make_patternx(), make_persistant_expression_to_effects(), make_persistant_expression_to_entity(), make_persistant_statement_to_cluster(), make_persistant_statement_to_control(), make_persistant_statement_to_int(), make_persistant_statement_to_statement(), make_placement(), make_plc(), make_points_to(), make_points_to_graph(), make_points_to_list(), make_pragma(), make_predicate(), make_preference(), make_property(), make_pstatement(), make_pstatement_reductions(), make_qualifier(), make_quast(), make_quast_leaf(), make_quast_value(), make_ram(), make_range(), make_rangecount(), make_real_resource(), make_recursive_selector(), make_reduced_loops(), make_reduction(), make_reduction_operator(), make_reductionInfo(), make_reductions(), make_ref_temp(), make_reference(), make_remapping(), make_renaming(), make_resource(), make_rtype(), make_rule(), make_scc(), make_sccflags(), make_sccs(), make_schedule(), make_sentence(), make_sequence(), make_sesam_buffers_processing_context(), make_sexpression(), make_simdstatement(), make_simple_section(), make_sizeofexpression(), make_statement(), make_statement_cell_relations(), make_statement_effects(), make_statement_entities(), make_statement_points_to(), make_statement_renamings(), make_statement_task(), make_static_control(), make_status(), make_step_clause(), make_step_comm(), make_step_directive(), make_step_directives(), make_step_point(), make_storage(), make_style(), make_subscript(), make_successor(), make_symbolic(), make_synchronization(), make_syntax(), make_task(), make_task_buffers(), make_test(), make_text(), make_tiling(), make_transformation(), make_transformer(), make_type(), make_ubs(), make_ubs_check(), make_unformatted(), make_unstructured(), make_value(), make_var_val(), make_varcount(), make_variable(), make_vertex(), make_virtual_resource(), make_vtxcontent(), make_whileloop(), make_word_to_attachments(), and pipsdbm_read_statement_function().
|
static |
GEN_ALLOC allocates SIZE bytes to implement an object whose TYPE is the index in the Domains table.
A fairly sophisticated initialization process is run, namely arrays are filled with undefineds.
Definition at line 249 of file genClib.c.
References AND_OP, ARROW_OP, domain::co, domain::components, cp, fatal(), domain::first, gen_alloc_component, hash_chunk, hash_table_make(), i2a(), message_assert, gen_binding::name, domain::op, OR_OP, and user().
Referenced by gen_alloc().
re-entry is automatic for this function.
in bytes
save current status
build driver for gen_trav...
recursion from obj
restores status and returns result
Definition at line 2690 of file genClib.c.
References allocated_memory_leaf_in(), allocated_memory_obj_in(), allocated_memory_simple_in(), already_seen_objects, driver::array_leaf, current_size, gen_array_leaf(), gen_null(), gen_trav_obj(), hash_pointer, hash_table_free(), hash_table_make(), driver::leaf_in, driver::leaf_out, driver::null, driver::obj_in, driver::obj_out, driver::simple_in, and driver::simple_out.
Referenced by initialize_newgen(), and rice_dependence_graph().
|
static |
GEN_ARRAY_LEAF is the default recursive call to gen_trav_leaf.
Definition at line 494 of file genClib.c.
References gen_trav_leaf(), gen_trav_stop_recursion, and message_assert.
Referenced by gen_allocated_memory(), gen_defined_p(), gen_free(), gen_internal_context_multi_recurse(), gen_local_copy_tree(), gen_sharing_p(), gen_write_without_sharing(), and shared_pointers().
GEN_CHECK checks that the gen_chunk received OBJ is of the appropriate TYPE.
Definition at line 2356 of file genClib.c.
References abort, Domains, gen_chunk_undefined, gen_chunk::i, max_domain_index(), message_assert, gen_binding::name, and user().
Referenced by check_abc_checked(), check_action(), check_action_kind(), check_alias_association(), check_alias_associations(), check_align(), check_alignmap(), check_alignment(), check_application(), check_approximation(), check_area(), check_array_dimension_checked(), check_assignment(), check_atom(), check_attachee(), check_attachment(), check_attachments(), check_basic(), check_bdt(), check_bound_pair(), check_c_parser_context(), check_call(), check_call_site(), check_callees(), check_cast(), check_cell(), check_cell_interpretation(), check_cell_relation(), check_cell_relations(), check_chain(), check_clone_context(), check_code(), check_communication(), check_comp_desc(), check_comp_desc_set(), check_comp_sec(), check_complexity(), check_conditional(), check_cone(), check_conflict(), check_constant(), check_context_info(), check_control(), check_controlmap(), check_dad_struct(), check_dag(), check_dagvtx(), check_data(), check_data_status(), check_database(), check_dataflow(), check_dataval(), check_datavar(), check_db_owned_resources(), check_db_resource(), check_db_resources(), check_db_status(), check_db_symbol(), check_descriptor(), check_dfg_arc_label(), check_dfg_vertex_label(), check_dg_arc_label(), check_dg_vertex_label(), check_dimension(), check_dimension_checked(), check_distribute(), check_distributemap(), check_distribution(), check_dummy(), check_dynamic_check(), check_dynamic_status(), check_effect(), check_effects(), check_effects_classes(), check_entities(), check_entity(), check_entity_effects(), check_entity_entities(), check_entity_int(), check_entity_status(), check_entity_task_buffers(), check_entity_to_entity(), check_entitymap(), check_equivalences(), check_evaluation(), check_execution(), check_expression(), check_expressionwithlevel(), check_extension(), check_extensions(), check_forloop(), check_formal(), check_function(), check_functional(), check_gap(), check_gexpression(), check_graph(), check_hpf_newdecl(), check_hpf_newdecls(), check_hpfc_reductions(), check_hpfc_status(), check_ifcount(), check_instruction(), check_interpreted_cell(), check_interval_vertex_label(), check_language(), check_leaf_label(), check_lexpressionwithlevel(), check_lisp_expression(), check_loop(), check_makefile(), check_map_effect_bool(), check_map_effect_step_point(), check_map_entity_int(), check_match(), check_matchTree(), check_matchTreeSons(), check_memory_mapping(), check_message(), check_mode(), check_multitest(), check_newdeclmap(), check_normalized(), check_numbers_status(), check_opcode(), check_opcodeClass(), check_operator_id_tree(), check_overlap(), check_overlapsmap(), check_owner(), check_parameter(), check_path_selector(), check_path_selectors(), check_pattern(), check_patternArg(), check_patternx(), check_persistant_expression_to_effects(), check_persistant_expression_to_entity(), check_persistant_statement_to_cluster(), check_persistant_statement_to_control(), check_persistant_statement_to_int(), check_persistant_statement_to_statement(), check_placement(), check_plc(), check_points_to(), check_points_to_graph(), check_points_to_list(), check_pragma(), check_predicate(), check_preference(), check_property(), check_pstatement(), check_pstatement_reductions(), check_qualifier(), check_quast(), check_quast_leaf(), check_quast_value(), check_ram(), check_range(), check_rangecount(), check_real_resource(), check_recursive_selector(), check_reduced_loops(), check_reduction(), check_reduction_operator(), check_reductionInfo(), check_reductions(), check_ref_temp(), check_reference(), check_remapping(), check_renaming(), check_resource(), check_rtype(), check_rule(), check_scc(), check_sccflags(), check_sccs(), check_schedule(), check_sentence(), check_sequence(), check_sesam_buffers_processing_context(), check_sexpression(), check_simdstatement(), check_simple_section(), check_sizeofexpression(), check_statement(), check_statement_cell_relations(), check_statement_effects(), check_statement_entities(), check_statement_points_to(), check_statement_renamings(), check_statement_task(), check_static_control(), check_status(), check_step_clause(), check_step_comm(), check_step_directive(), check_step_directives(), check_step_point(), check_storage(), check_style(), check_subscript(), check_successor(), check_symbolic(), check_synchronization(), check_syntax(), check_task(), check_task_buffers(), check_test(), check_text(), check_tiling(), check_transformation(), check_transformer(), check_type(), check_ubs(), check_ubs_check(), check_unformatted(), check_unstructured(), check_value(), check_var_val(), check_varcount(), check_variable(), check_vertex(), check_virtual_resource(), check_vtxcontent(), check_whileloop(), check_word_to_attachments(), gen_trav_leaf(), generic_value_name(), and pips_user_value_name().
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
Definition at line 2398 of file genClib.c.
References black_hole, check_read_spec_performed, cumulated_error_seen, error_seen, GEN_DBG_CHECK, gen_debug, gen_write(), and open_black_hole().
Referenced by abc_checked_consistent_p(), action_consistent_p(), action_kind_consistent_p(), alias_association_consistent_p(), alias_associations_consistent_p(), align_consistent_p(), alignmap_consistent_p(), alignment_consistent_p(), application_consistent_p(), approximation_consistent_p(), area_consistent_p(), array_dimension_checked_consistent_p(), assignment_consistent_p(), atom_consistent_p(), attachee_consistent_p(), attachment_consistent_p(), attachments_consistent_p(), basic_consistent_p(), bdsc_code_instrumentation(), bdt_consistent_p(), bound_pair_consistent_p(), c_parser_context_consistent_p(), call_consistent_p(), call_site_consistent_p(), callees_consistent_p(), cast_consistent_p(), cell_consistent_p(), cell_interpretation_consistent_p(), cell_relation_consistent_p(), cell_relations_consistent_p(), chain_consistent_p(), clone_context_consistent_p(), cluster_stage_spire(), cluster_stage_spire_generation(), code_consistent_p(), communication_consistent_p(), communications_construction(), comp_desc_consistent_p(), comp_desc_set_consistent_p(), comp_sec_consistent_p(), complexity_consistent_p(), conditional_consistent_p(), cone_consistent_p(), conflict_consistent_p(), constant_consistent_p(), context_info_consistent_p(), control_consistent_p(), controlmap_consistent_p(), dad_struct_consistent_p(), dag_consistent_p(), dagvtx_consistent_p(), data_consistent_p(), data_status_consistent_p(), database_consistent_p(), dataflow_consistent_p(), dataval_consistent_p(), datavar_consistent_p(), db_owned_resources_consistent_p(), db_resource_consistent_p(), db_resources_consistent_p(), db_status_consistent_p(), db_symbol_consistent_p(), descriptor_consistent_p(), dfg_arc_label_consistent_p(), dfg_vertex_label_consistent_p(), dg_arc_label_consistent_p(), dg_vertex_label_consistent_p(), dimension_checked_consistent_p(), dimension_consistent_p(), distribute_code(), distribute_consistent_p(), distributemap_consistent_p(), distribution_consistent_p(), dummy_consistent_p(), dynamic_check_consistent_p(), dynamic_status_consistent_p(), effect_consistent_p(), effects_classes_consistent_p(), effects_consistent_p(), entities_consistent_p(), entity_consistent_p(), entity_effects_consistent_p(), entity_entities_consistent_p(), entity_int_consistent_p(), entity_status_consistent_p(), entity_task_buffers_consistent_p(), entity_to_entity_consistent_p(), entitymap_consistent_p(), equivalences_consistent_p(), evaluation_consistent_p(), execution_consistent_p(), expression_consistent_p(), expressionwithlevel_consistent_p(), extension_consistent_p(), extensions_consistent_p(), forloop_consistent_p(), formal_consistent_p(), function_consistent_p(), functional_consistent_p(), gap_consistent_p(), gexpression_consistent_p(), graph_consistent_p(), hbdsc_parallelization(), hpf_newdecl_consistent_p(), hpf_newdecls_consistent_p(), hpfc_reductions_consistent_p(), hpfc_status_consistent_p(), ifcount_consistent_p(), instruction_consistent_p(), interpreted_cell_consistent_p(), interval_vertex_label_consistent_p(), language_consistent_p(), leaf_label_consistent_p(), lexpressionwithlevel_consistent_p(), lisp_expression_consistent_p(), loop_consistent_p(), makefile_consistent_p(), map_effect_bool_consistent_p(), map_effect_step_point_consistent_p(), map_entity_int_consistent_p(), match_consistent_p(), matchTree_consistent_p(), matchTreeSons_consistent_p(), memory_mapping_consistent_p(), message_consistent_p(), mode_consistent_p(), mpi_initialize(), mpi_task_generation(), multitest_consistent_p(), newdeclmap_consistent_p(), normalized_consistent_p(), numbers_status_consistent_p(), opcode_consistent_p(), opcodeClass_consistent_p(), operator_id_tree_consistent_p(), overlap_consistent_p(), overlapsmap_consistent_p(), owner_consistent_p(), parameter_consistent_p(), path_selector_consistent_p(), path_selectors_consistent_p(), pattern_consistent_p(), patternArg_consistent_p(), patternx_consistent_p(), persistant_expression_to_effects_consistent_p(), persistant_expression_to_entity_consistent_p(), persistant_statement_to_cluster_consistent_p(), persistant_statement_to_control_consistent_p(), persistant_statement_to_int_consistent_p(), persistant_statement_to_statement_consistent_p(), phrase_comEngine_distributor(), phrase_distributor(), phrase_distributor_control_code(), phrase_distributor_init(), pipsdbm_check_statement_mapping(), pipsdbm_consistent_statement_function(), placement_consistent_p(), plc_consistent_p(), points_to_consistent_p(), points_to_graph_consistent_p(), points_to_list_consistent_p(), pragma_consistent_p(), predicate_consistent_p(), preference_consistent_p(), property_consistent_p(), pstatement_consistent_p(), pstatement_reductions_consistent_p(), qualifier_consistent_p(), quast_consistent_p(), quast_leaf_consistent_p(), quast_value_consistent_p(), ram_consistent_p(), range_consistent_p(), rangecount_consistent_p(), real_resource_consistent_p(), recursive_selector_consistent_p(), reduced_loops_consistent_p(), reduction_consistent_p(), reduction_operator_consistent_p(), reductionInfo_consistent_p(), reductions_consistent_p(), ref_temp_consistent_p(), reference_consistent_p(), remapping_consistent_p(), renaming_consistent_p(), resource_consistent_p(), rtype_consistent_p(), rule_consistent_p(), safescale_distributor(), safescale_distributor_init(), scc_consistent_p(), sccflags_consistent_p(), sccs_consistent_p(), schedule_consistent_p(), sentence_consistent_p(), sequence_consistent_p(), sesam_buffers_processing_context_consistent_p(), sexpression_consistent_p(), simdstatement_consistent_p(), simple_section_consistent_p(), sizeofexpression_consistent_p(), spire_shared_unstructured_to_structured(), statement_cell_relations_consistent_p(), statement_consistent_p(), statement_effects_consistent_p(), statement_entities_consistent_p(), statement_points_to_consistent_p(), statement_renamings_consistent_p(), statement_task_consistent_p(), static_control_consistent_p(), status_consistent_p(), step_clause_consistent_p(), step_comm_consistent_p(), step_directive_consistent_p(), step_directives_consistent_p(), step_point_consistent_p(), storage_consistent_p(), style_consistent_p(), subscript_consistent_p(), successor_consistent_p(), symbolic_consistent_p(), synchronization_consistent_p(), syntax_consistent_p(), task_buffers_consistent_p(), task_consistent_p(), task_time_polynome(), test_consistent_p(), text_consistent_p(), tiling_consistent_p(), transformation_consistent_p(), transformer_consistent_p(), type_consistent_p(), ubs_check_consistent_p(), ubs_consistent_p(), unformatted_consistent_p(), unstructured_consistent_p(), value_consistent_p(), var_val_consistent_p(), varcount_consistent_p(), variable_consistent_p(), vertex_consistent_p(), virtual_resource_consistent_p(), void_gen_consistent_p(), vtxcontent_consistent_p(), whileloop_consistent_p(), and word_to_attachments_consistent_p().
GEN_COPY_ARRAY duplicates an array.
if array elements are inlinable, the old array is copied into the new one. if not, the new array must contain the objects that copy_table provides for the old objects contained in the old array. the second argument is the domain pointer of the old array
Definition at line 1222 of file genClib.c.
References alloc(), domain::ar, array_size(), copy_hsearch(), domain::dimensions, domain::element, IS_INLINABLE, and gen_chunk::p.
Referenced by copy_simple_out().
GEN_COPY_LIST duplicates cons cells.
if list elements are inlinable, the old cell CARs are copied into the new ones. if not, the new cells must contain the objects that copy_table provides for the old objects contained in old cells. the second argument is the domain pointer of old list
else the items must also be copied
pc is linked to the new list
Definition at line 1179 of file genClib.c.
References alloc(), cons::car, cons::cdr, copy_hsearch(), domain::element, gen_copy_seq(), IS_INLINABLE, IS_TABULATED, domain::li, NIL, gen_chunk::p, domain::persistant, and gen_binding::tabulated.
Referenced by copy_simple_out().
GEN_COPY_SET duplicates a set.
Definition at line 1247 of file genClib.c.
References copy_hsearch(), domain::element, IS_INLINABLE, domain::se, set_add_element(), set_assign(), set_make(), SET_MAP, and domain::what.
Referenced by copy_simple_out().
Definition at line 1429 of file genClib.c.
References gen_chunk_undefined, gen_chunk_undefined_p, and gen_local_copy_tree().
Referenced by copy_abc_checked(), copy_action(), copy_action_kind(), copy_alias_association(), copy_alias_associations(), copy_align(), copy_alignmap(), copy_alignment(), copy_application(), copy_approximation(), copy_area(), copy_array_dimension_checked(), copy_assignment(), copy_atom(), copy_attachee(), copy_attachment(), copy_attachments(), copy_basic(), copy_bdt(), copy_bound_pair(), copy_c_parser_context(), copy_call(), copy_call_site(), copy_callees(), copy_cast(), copy_cell(), copy_cell_interpretation(), copy_cell_relation(), copy_cell_relations(), copy_chain(), copy_clone_context(), copy_code(), copy_communication(), copy_comp_desc(), copy_comp_desc_set(), copy_comp_sec(), copy_complexity(), copy_conditional(), copy_cone(), copy_conflict(), copy_constant(), copy_context_info(), copy_control(), copy_controlmap(), copy_dad_struct(), copy_dag(), copy_dagvtx(), copy_data(), copy_data_status(), copy_database(), copy_dataflow(), copy_dataval(), copy_datavar(), copy_db_owned_resources(), copy_db_resource(), copy_db_resources(), copy_db_status(), copy_db_symbol(), copy_descriptor(), copy_dfg_arc_label(), copy_dfg_vertex_label(), copy_dg_arc_label(), copy_dg_vertex_label(), copy_dimension(), copy_dimension_checked(), copy_distribute(), copy_distributemap(), copy_distribution(), copy_dummy(), copy_dynamic_check(), copy_dynamic_status(), copy_effect(), copy_effects(), copy_effects_classes(), copy_entities(), copy_entity(), copy_entity_effects(), copy_entity_entities(), copy_entity_int(), copy_entity_status(), copy_entity_task_buffers(), copy_entity_to_entity(), copy_entitymap(), copy_equivalences(), copy_evaluation(), copy_execution(), copy_expression(), copy_expressionwithlevel(), copy_extension(), copy_extensions(), copy_forloop(), copy_formal(), copy_function(), copy_functional(), copy_gap(), copy_gexpression(), copy_graph(), copy_hpf_newdecl(), copy_hpf_newdecls(), copy_hpfc_reductions(), copy_hpfc_status(), copy_ifcount(), copy_instruction(), copy_interpreted_cell(), copy_interval_vertex_label(), copy_language(), copy_leaf_label(), copy_lexpressionwithlevel(), copy_lisp_expression(), copy_loop(), copy_makefile(), copy_map_effect_bool(), copy_map_effect_step_point(), copy_map_entity_int(), copy_match(), copy_matchTree(), copy_matchTreeSons(), copy_memory_mapping(), copy_message(), copy_mode(), copy_multitest(), copy_newdeclmap(), copy_normalized(), copy_numbers_status(), copy_opcode(), copy_opcodeClass(), copy_operator_id_tree(), copy_overlap(), copy_overlapsmap(), copy_owner(), copy_parameter(), copy_path_selector(), copy_path_selectors(), copy_pattern(), copy_patternArg(), copy_patternx(), copy_persistant_expression_to_effects(), copy_persistant_expression_to_entity(), copy_persistant_statement_to_cluster(), copy_persistant_statement_to_control(), copy_persistant_statement_to_int(), copy_persistant_statement_to_statement(), copy_placement(), copy_plc(), copy_points_to(), copy_points_to_graph(), copy_points_to_list(), copy_pragma(), copy_predicate(), copy_preference(), copy_property(), copy_pstatement(), copy_pstatement_reductions(), copy_qualifier(), copy_quast(), copy_quast_leaf(), copy_quast_value(), copy_ram(), copy_range(), copy_rangecount(), copy_real_resource(), copy_recursive_selector(), copy_reduced_loops(), copy_reduction(), copy_reduction_operator(), copy_reductionInfo(), copy_reductions(), copy_ref_temp(), copy_reference(), copy_remapping(), copy_renaming(), copy_resource(), copy_rtype(), copy_rule(), copy_scc(), copy_sccflags(), copy_sccs(), copy_schedule(), copy_sentence(), copy_sequence(), copy_sesam_buffers_processing_context(), copy_sexpression(), copy_simdstatement(), copy_simple_section(), copy_sizeofexpression(), copy_statement(), copy_statement_cell_relations(), copy_statement_effects(), copy_statement_entities(), copy_statement_points_to(), copy_statement_renamings(), copy_statement_task(), copy_static_control(), copy_status(), copy_step_clause(), copy_step_comm(), copy_step_directive(), copy_step_directives(), copy_step_point(), copy_storage(), copy_style(), copy_subscript(), copy_successor(), copy_symbolic(), copy_synchronization(), copy_syntax(), copy_task(), copy_task_buffers(), copy_test(), copy_text(), copy_tiling(), copy_transformation(), copy_transformer(), copy_type(), copy_ubs(), copy_ubs_check(), copy_unformatted(), copy_unstructured(), copy_value(), copy_var_val(), copy_varcount(), copy_variable(), copy_vertex(), copy_virtual_resource(), copy_vtxcontent(), copy_whileloop(), copy_word_to_attachments(), gen_full_copy_list(), and gfc2pips_code2instruction_().
for re-entry only in gen_copy_tree...
??? because externals are internals... FC.
Definition at line 1442 of file genClib.c.
References gen_local_copy_tree().
Referenced by initialize_newgen().
Definition at line 2438 of file genClib.c.
References driver::array_leaf, black_hole, check_read_spec_performed, defined_null(), error_seen, gen_array_leaf(), gen_chunk_undefined_p, gen_null(), gen_trav_obj(), driver::leaf_in, driver::leaf_out, driver::null, driver::obj_in, driver::obj_out, open_black_hole(), pop_gen_trav_env(), push_gen_trav_env(), shared_pointers(), driver::simple_in, driver::simple_out, user_file, write_leaf_in(), write_obj_in(), write_obj_out(), write_simple_in(), and write_simple_out().
Referenced by abc_checked_defined_p(), action_defined_p(), action_kind_defined_p(), alias_association_defined_p(), alias_associations_defined_p(), align_defined_p(), alignmap_defined_p(), alignment_defined_p(), application_defined_p(), approximation_defined_p(), area_defined_p(), array_dimension_checked_defined_p(), assignment_defined_p(), atom_defined_p(), attachee_defined_p(), attachment_defined_p(), attachments_defined_p(), basic_defined_p(), bdt_defined_p(), bound_pair_defined_p(), c_parser_context_defined_p(), call_defined_p(), call_site_defined_p(), callees_defined_p(), cast_defined_p(), cell_defined_p(), cell_interpretation_defined_p(), cell_relation_defined_p(), cell_relations_defined_p(), chain_defined_p(), clone_context_defined_p(), code_defined_p(), communication_defined_p(), comp_desc_defined_p(), comp_desc_set_defined_p(), comp_sec_defined_p(), complexity_defined_p(), conditional_defined_p(), cone_defined_p(), conflict_defined_p(), constant_defined_p(), context_info_defined_p(), control_defined_p(), controlmap_defined_p(), dad_struct_defined_p(), dag_defined_p(), dagvtx_defined_p(), data_defined_p(), data_status_defined_p(), database_defined_p(), dataflow_defined_p(), dataval_defined_p(), datavar_defined_p(), db_owned_resources_defined_p(), db_resource_defined_p(), db_resources_defined_p(), db_status_defined_p(), db_symbol_defined_p(), descriptor_defined_p(), dfg_arc_label_defined_p(), dfg_vertex_label_defined_p(), dg_arc_label_defined_p(), dg_vertex_label_defined_p(), dimension_checked_defined_p(), dimension_defined_p(), distribute_defined_p(), distributemap_defined_p(), distribution_defined_p(), dummy_defined_p(), dynamic_check_defined_p(), dynamic_status_defined_p(), effect_defined_p(), effects_classes_defined_p(), effects_defined_p(), entities_defined_p(), entity_defined_p(), entity_effects_defined_p(), entity_entities_defined_p(), entity_int_defined_p(), entity_status_defined_p(), entity_task_buffers_defined_p(), entity_to_entity_defined_p(), entitymap_defined_p(), equivalences_defined_p(), evaluation_defined_p(), execution_defined_p(), expression_defined_p(), expressionwithlevel_defined_p(), extension_defined_p(), extensions_defined_p(), forloop_defined_p(), formal_defined_p(), function_defined_p(), functional_defined_p(), gap_defined_p(), gexpression_defined_p(), graph_defined_p(), hpf_newdecl_defined_p(), hpf_newdecls_defined_p(), hpfc_reductions_defined_p(), hpfc_status_defined_p(), ifcount_defined_p(), instruction_defined_p(), interpreted_cell_defined_p(), interval_vertex_label_defined_p(), language_defined_p(), leaf_label_defined_p(), lexpressionwithlevel_defined_p(), lisp_expression_defined_p(), loop_defined_p(), makefile_defined_p(), map_effect_bool_defined_p(), map_effect_step_point_defined_p(), map_entity_int_defined_p(), match_defined_p(), matchTree_defined_p(), matchTreeSons_defined_p(), memory_mapping_defined_p(), message_defined_p(), mode_defined_p(), multitest_defined_p(), newdeclmap_defined_p(), normalized_defined_p(), numbers_status_defined_p(), opcode_defined_p(), opcodeClass_defined_p(), operator_id_tree_defined_p(), overlap_defined_p(), overlapsmap_defined_p(), owner_defined_p(), parameter_defined_p(), path_selector_defined_p(), path_selectors_defined_p(), pattern_defined_p(), patternArg_defined_p(), patternx_defined_p(), persistant_expression_to_effects_defined_p(), persistant_expression_to_entity_defined_p(), persistant_statement_to_cluster_defined_p(), persistant_statement_to_control_defined_p(), persistant_statement_to_int_defined_p(), persistant_statement_to_statement_defined_p(), placement_defined_p(), plc_defined_p(), points_to_defined_p(), points_to_graph_defined_p(), points_to_list_defined_p(), pragma_defined_p(), predicate_defined_p(), preference_defined_p(), property_defined_p(), pstatement_defined_p(), pstatement_reductions_defined_p(), qualifier_defined_p(), quast_defined_p(), quast_leaf_defined_p(), quast_value_defined_p(), ram_defined_p(), range_defined_p(), rangecount_defined_p(), real_resource_defined_p(), recursive_selector_defined_p(), reduced_loops_defined_p(), reduction_defined_p(), reduction_operator_defined_p(), reductionInfo_defined_p(), reductions_defined_p(), ref_temp_defined_p(), reference_defined_p(), remapping_defined_p(), renaming_defined_p(), resource_defined_p(), rtype_defined_p(), rule_defined_p(), scc_defined_p(), sccflags_defined_p(), sccs_defined_p(), schedule_defined_p(), sentence_defined_p(), sequence_defined_p(), sesam_buffers_processing_context_defined_p(), sexpression_defined_p(), simdstatement_defined_p(), simple_section_defined_p(), sizeofexpression_defined_p(), statement_cell_relations_defined_p(), statement_defined_p(), statement_effects_defined_p(), statement_entities_defined_p(), statement_points_to_defined_p(), statement_renamings_defined_p(), statement_task_defined_p(), static_control_defined_p(), status_defined_p(), step_clause_defined_p(), step_comm_defined_p(), step_directive_defined_p(), step_directives_defined_p(), step_point_defined_p(), storage_defined_p(), style_defined_p(), subscript_defined_p(), successor_defined_p(), symbolic_defined_p(), synchronization_defined_p(), syntax_defined_p(), task_buffers_defined_p(), task_defined_p(), test_defined_p(), text_defined_p(), tiling_defined_p(), transformation_defined_p(), transformer_defined_p(), type_defined_p(), ubs_check_defined_p(), ubs_defined_p(), unformatted_defined_p(), unstructured_defined_p(), value_defined_p(), var_val_defined_p(), varcount_defined_p(), variable_defined_p(), vertex_defined_p(), virtual_resource_defined_p(), vtxcontent_defined_p(), whileloop_defined_p(), and word_to_attachments_defined_p().
GEN_DOMAIN_NAME returns the domain name, and may be used for debug purposes.
It should be a valid domain name.
FC 29/12/94
Definition at line 97 of file genClib.c.
References check_domain, Domains, and gen_binding::name.
Referenced by set_glopriv(), and update_object_for_module().
void gen_free | ( | gen_chunk * | obj | ) |
version without shared_pointers.
automatic re-entry allowed. FC.
reentry or not: whether the already_seen table is initialized or not...
Definition at line 992 of file genClib.c.
References driver::array_leaf, check_read_spec_performed, free_already_seen, free_leaf_in(), free_leaf_out(), free_obj_in(), free_obj_out(), free_simple_out(), gen_array_leaf(), gen_null(), gen_trav_obj(), hash_pointer, hash_table_free(), hash_table_make(), driver::leaf_in, driver::leaf_out, driver::null, driver::obj_in, driver::obj_out, persistant_simple_in(), driver::simple_in, and driver::simple_out.
Referenced by EvalBinaryOp(), EvalUnaryOp(), free_abc_checked(), free_action(), free_action_kind(), free_alias_association(), free_alias_associations(), free_align(), free_alignmap(), free_alignment(), free_application(), free_approximation(), free_area(), free_array_dimension_checked(), free_assignment(), free_atom(), free_attachee(), free_attachment(), free_attachments(), free_basic(), free_bdt(), free_bound_pair(), free_c_parser_context(), free_call(), free_call_site(), free_callees(), free_cast(), free_cell(), free_cell_interpretation(), free_cell_relation(), free_cell_relations(), free_chain(), free_clone_context(), free_code(), free_communication(), free_comp_desc(), free_comp_desc_set(), free_comp_sec(), free_complexity(), free_conditional(), free_cone(), free_conflict(), free_constant(), free_context_info(), free_control(), free_controlmap(), free_dad_struct(), free_dag(), free_dagvtx(), free_data(), free_data_status(), free_database(), free_dataflow(), free_dataval(), free_datavar(), free_db_owned_resources(), free_db_resource(), free_db_resources(), free_db_status(), free_db_symbol(), free_descriptor(), free_dfg_arc_label(), free_dfg_vertex_label(), free_dg_arc_label(), free_dg_vertex_label(), free_dimension(), free_dimension_checked(), free_distribute(), free_distributemap(), free_distribution(), free_dummy(), free_dynamic_check(), free_dynamic_status(), free_effect(), free_effects(), free_effects_classes(), free_entities(), free_entity(), free_entity_effects(), free_entity_entities(), free_entity_int(), free_entity_status(), free_entity_task_buffers(), free_entity_to_entity(), free_entitymap(), free_equivalences(), free_evaluation(), free_execution(), free_expression(), free_expressionwithlevel(), free_extension(), free_extensions(), free_forloop(), free_formal(), free_function(), free_functional(), free_gap(), free_gexpression(), free_graph(), free_hpf_newdecl(), free_hpf_newdecls(), free_hpfc_reductions(), free_hpfc_status(), free_ifcount(), free_instruction(), free_interpreted_cell(), free_interval_vertex_label(), free_language(), free_leaf_label(), free_lexpressionwithlevel(), free_lisp_expression(), free_loop(), free_makefile(), free_map_effect_bool(), free_map_effect_step_point(), free_map_entity_int(), free_match(), free_matchTree(), free_matchTreeSons(), free_memory_mapping(), free_message(), free_mode(), free_multitest(), free_newdeclmap(), free_normalized(), free_numbers_status(), free_opcode(), free_opcodeClass(), free_operator_id_tree(), free_overlap(), free_overlapsmap(), free_owner(), free_parameter(), free_path_selector(), free_path_selectors(), free_pattern(), free_patternArg(), free_patternx(), free_persistant_expression_to_effects(), free_persistant_expression_to_entity(), free_persistant_statement_to_cluster(), free_persistant_statement_to_control(), free_persistant_statement_to_int(), free_persistant_statement_to_statement(), free_placement(), free_plc(), free_points_to(), free_points_to_graph(), free_points_to_list(), free_pragma(), free_predicate(), free_preference(), free_property(), free_pstatement(), free_pstatement_reductions(), free_qualifier(), free_quast(), free_quast_leaf(), free_quast_value(), free_ram(), free_range(), free_rangecount(), free_real_resource(), free_recursive_selector(), free_reduced_loops(), free_reduction(), free_reduction_operator(), free_reductionInfo(), free_reductions(), free_ref_temp(), free_reference(), free_remapping(), free_renaming(), free_resource(), free_rtype(), free_rule(), free_scc(), free_sccflags(), free_sccs(), free_schedule(), free_sentence(), free_sequence(), free_sesam_buffers_processing_context(), free_sexpression(), free_simdstatement(), free_simple_section(), free_sizeofexpression(), free_statement(), free_statement_cell_relations(), free_statement_effects(), free_statement_entities(), free_statement_points_to(), free_statement_renamings(), free_statement_task(), free_static_control(), free_static_control_mapping(), free_status(), free_step_clause(), free_step_comm(), free_step_directive(), free_step_directives(), free_step_point(), free_storage(), free_style(), free_subscript(), free_successor(), free_symbolic(), free_synchronization(), free_syntax(), free_task(), free_task_buffers(), free_test(), free_text(), free_tiling(), free_transformation(), free_transformer(), free_type(), free_ubs(), free_ubs_check(), free_unformatted(), free_unstructured(), free_value(), free_var_val(), free_varcount(), free_variable(), free_vertex(), free_virtual_resource(), free_vtxcontent(), free_whileloop(), free_word_to_attachments(), gen_free_tabulated(), gen_full_free_list(), hpf_remapping(), initialize_newgen(), NStackPop(), pipsdbm_free_statement_mapping(), regenerate_renamings(), summary_to_proper_reference(), and translate_reduction().
free tabulated elements of this domain.
since gen_free is reentrant and manages sharing globally with the following table, we just call it for each object and everything is fine. Well, I hope so. FC
Definition at line 1461 of file genClib.c.
References check_read_spec_performed, free_already_seen, gen_free(), gen_mapc_tabulated(), hash_pointer, hash_table_free(), hash_table_make(), and message_assert.
Referenced by pipsdbm_free_entities(), and save_meta_data().
void gen_full_free_list | ( | list | l | ) |
Definition at line 1023 of file genClib.c.
References CAR, cons::cdr, free_already_seen, gen_free(), hash_pointer, hash_table_free(), hash_table_make(), and newgen_free.
Referenced by __attribute__(), add_prettyprint_control_list_to_declaration_statement(), add_values_for_simple_effects_of_statement(), any_basic_update_operation_to_transformer(), apply_a_rule(), binary_arithmetic_operator_to_post_pv(), binary_intrinsic_call_to_points_to_sinks(), block_to_transformer_list(), c_convex_effects_on_actual_parameter_forward_translation(), c_convex_effects_on_formal_parameter_backward_translation(), c_text_entity(), call_flt(), cells_to_read_or_write_effects(), check_physical_resource_up_to_date(), check_proper_reductions(), clean_up_sequences_rewrite(), clean_up_transformer_list(), compute_recv_regions(), compute_send_regions(), condition_to_transformer(), conditional_operator_to_post_pv(), constant_reference_to_normalized_constant_reference(), convex_cell_reference_preceding_p(), dimensions_to_dma(), do_array_expansion(), do_atomize_call(), do_brace_expression_to_statements(), do_grouping_replace_reference_by_expression_walker(), do_linearize_array_init(), do_linearize_array_reference(), do_linearize_type(), do_loop_nest_unswitching(), do_outliner_smart_replacment(), do_resource_usage_check(), effects_to_dma(), eval_cell_with_points_to(), expr_level_of(), expression_effects_to_transformer(), expression_to_points_to(), expression_to_post_pv(), external_call_to_post_pv(), forloop_to_post_pv(), free_pv_results_paths(), free_to_post_pv(), freed_pointer_to_points_to(), generic_c_words_simplified_entity(), generic_effect_find_aliases_with_simple_pointer_values(), heap_intrinsic_to_post_pv(), hwac_replace_statement(), intrinsic_call_to_type(), invalidate_expressions_in_statement(), kill_pointer_values(), list_of_compatible_reductions(), live_in_paths_of_loop(), live_out_paths_from_loop_to_body(), logical_operator_to_post_pv(), loop_annotate(), loop_to_post_pv(), make_required(), module_initial_parameter_pv(), multiple_pointer_assignment_to_post_pv(), new_array_elements_backward_substitution_in_transformer(), opencl_generate_special_kernel_ops(), other_cool_enough_for_a_last_substitution(), outliner_smart_references_computation(), pointer_values_remove_var(), points_to_cell_to_upper_bound_points_to_cells(), print_qualifiers(), prune_singleton(), reductions_rewrite(), region_to_minimal_dimensions(), remove_interval_predecessors(), replace_field_by_reference_walker(), rmake(), safe_any_expression_to_transformer(), safe_expression_to_transformer(), safe_intrinsic_to_post_pv(), seq_flt(), simd_check_argType(), single_pointer_assignment_to_post_pv(), statement_clean_declarations_helper(), statement_insertion_fix_access(), statement_insertion_fix_access_in_callers(), statement_remove_extensions(), struct_variable_to_pointer_locations(), subscript_to_points_to_sinks(), subscripted_type_to_type(), successor_only_has_rr_conflict_p(), symbolic_tiling(), transformer_list_closure_to_precondition_depth_two(), transformer_list_closure_to_precondition_max_depth(), transformer_list_multiple_closure_to_precondition(), try_reorder_expressions(), two_addresses_code_generator(), undo_rename_reference(), unstructured_to_post_pv(), update_operator_to_post_pv(), update_preserved_resources(), whileloop_to_post_pv(), whileloop_to_postcondition(), and words_points_to_list().
void gen_init_external | ( | int | which, |
void *(*)(FILE *, int(*)(void)) | read, | ||
void(*)(FILE *, void *) | write, | ||
void(*)(void *) | free, | ||
void *(*)(void *) | copy, | ||
int(*)(void *) | allocated_memory | ||
) |
GEN_INIT_EXTERNAL defines entry points for free, read and write functions of external types.
Definition at line 2276 of file genClib.c.
References domain::allocated_memory, domain::ba, domain::copy, gen_binding::domain, Domains, domain::ex, EXTERNAL_DT, free(), domain::free, gen_binding::name, domain::read, return(), domain::type, user(), and domain::write.
Referenced by initialize_newgen(), main(), and pips_init().
GEN_COPY_TREE makes a copy of the object OBJ.
whether to keep the copy tables...
Save the old copy_table if required...
restore copy environment if needed
Definition at line 1387 of file genClib.c.
References driver::array_leaf, check_read_spec_performed, domain::copy, copy_hsearch(), copy_leaf_out(), copy_obj_in(), copy_obj_out(), copy_simple_in(), copy_simple_out(), copy_table, gen_array_leaf(), gen_null(), gen_trav_obj(), hash_pointer, hash_table_free(), hash_table_make(), hash_table_undefined, keep, driver::leaf_in, driver::leaf_out, driver::null, driver::obj_in, driver::obj_out, driver::simple_in, driver::simple_out, and tabulated_leaf_in().
Referenced by gen_copy_tree(), and gen_copy_tree_with_sharing().
GEN_MAKE_ARRAY allocates an initialized array of NUM gen_chunks.
OSTRICT
Definition at line 2307 of file genClib.c.
References alloc(), domain::ar, gen_chunk_undefined, and num.
gen_chunk* gen_read | ( | FILE * | file | ) |
GEN_READ reads any object from the FILE stream.
Sharing is restored.
Definition at line 2323 of file genClib.c.
References gen_chunk_undefined, genread_parse(), newgen_start_lexer(), and Read_chunk.
Referenced by initialize_newgen(), pipsdbm_read_statement_function(), pipsdbm_read_statement_mapping(), process_user_file(), read_abc_checked(), read_action(), read_action_kind(), read_alias_association(), read_alias_associations(), read_align(), read_alignmap(), read_alignment(), read_application(), read_approximation(), read_area(), read_array_dimension_checked(), read_assignment(), read_atom(), read_attachee(), read_attachment(), read_attachments(), read_basic(), read_bdt(), read_bound_pair(), read_c_parser_context(), read_call(), read_call_site(), read_callees(), read_cast(), read_cell(), read_cell_interpretation(), read_cell_relation(), read_cell_relations(), read_chain(), read_clone_context(), read_code(), read_communication(), read_comp_desc(), read_comp_desc_set(), read_comp_sec(), read_complexity(), read_conditional(), read_cone(), read_conflict(), read_constant(), read_context_info(), read_control(), read_controlmap(), read_dad_struct(), read_dag(), read_dagvtx(), read_data(), read_data_status(), read_database(), read_dataflow(), read_dataval(), read_datavar(), read_db_owned_resources(), read_db_resource(), read_db_resources(), read_db_status(), read_descriptor(), read_dfg_arc_label(), read_dfg_vertex_label(), read_dg_arc_label(), read_dg_vertex_label(), read_dimension(), read_dimension_checked(), read_distribute(), read_distributemap(), read_distribution(), read_dummy(), read_dynamic_check(), read_dynamic_status(), read_effect(), read_effects(), read_effects_classes(), read_entities(), read_entity_effects(), read_entity_entities(), read_entity_int(), read_entity_status(), read_entity_task_buffers(), read_entity_to_entity(), read_entitymap(), read_equivalences(), read_evaluation(), read_execution(), read_expression(), read_expressionwithlevel(), read_extension(), read_extensions(), read_forloop(), read_formal(), read_function(), read_functional(), read_gap(), read_gexpression(), read_graph(), read_hpf_newdecl(), read_hpf_newdecls(), read_hpfc_reductions(), read_hpfc_status(), read_ifcount(), read_instruction(), read_interpreted_cell(), read_interval_vertex_label(), read_language(), read_leaf_label(), read_lexpressionwithlevel(), read_lisp_expression(), read_loop(), read_makefile(), read_map_effect_bool(), read_map_effect_step_point(), read_map_entity_int(), read_match(), read_matchTree(), read_matchTreeSons(), read_memory_mapping(), read_message(), read_mode(), read_multitest(), read_newdeclmap(), read_normalized(), read_numbers_status(), read_opcode(), read_operator_id_tree(), read_overlap(), read_overlapsmap(), read_owner(), read_parameter(), read_path_selector(), read_path_selectors(), read_pattern(), read_patternArg(), read_patternx(), read_persistant_expression_to_effects(), read_persistant_expression_to_entity(), read_persistant_statement_to_cluster(), read_persistant_statement_to_control(), read_persistant_statement_to_int(), read_persistant_statement_to_statement(), read_placement(), read_plc(), read_points_to(), read_points_to_graph(), read_points_to_list(), read_pragma(), read_predicate(), read_preference(), read_property(), read_pstatement(), read_pstatement_reductions(), read_qualifier(), read_quast(), read_quast_leaf(), read_quast_value(), read_ram(), read_range(), read_rangecount(), read_real_resource(), read_recursive_selector(), read_reduced_loops(), read_reduction(), read_reduction_operator(), read_reductionInfo(), read_reductions(), read_ref_temp(), read_reference(), read_remapping(), read_renaming(), read_resource(), read_rtype(), read_rule(), read_scc(), read_sccflags(), read_sccs(), read_schedule(), read_sentence(), read_sequence(), read_sesam_buffers_processing_context(), read_sexpression(), read_simdstatement(), read_simple_section(), read_sizeofexpression(), read_statement(), read_statement_cell_relations(), read_statement_effects(), read_statement_entities(), read_statement_points_to(), read_statement_renamings(), read_statement_task(), read_static_control(), read_status(), read_step_clause(), read_step_comm(), read_step_directive(), read_step_directives(), read_step_point(), read_storage(), read_style(), read_subscript(), read_successor(), read_symbolic(), read_synchronization(), read_syntax(), read_task(), read_task_buffers(), read_test(), read_text(), read_tiling(), read_transformation(), read_transformer(), read_type(), read_ubs(), read_ubs_check(), read_unformatted(), read_unstructured(), read_value(), read_var_val(), read_varcount(), read_variable(), read_vertex(), read_virtual_resource(), read_vtxcontent(), read_whileloop(), and read_word_to_attachments().
void gen_read_spec | ( | char * | spec, |
... | |||
) |
default initialization of newgen lexers files:
now let's read the spec strings...
quick recurse decision tables initializations
set identity type translation tables
Definition at line 2218 of file genClib.c.
References domain::ba, compile(), gen_binding::domain, Domains, gen_type_translation_default(), genspec_in, genspec_lex_destroy(), genspec_out, genspec_parse(), genspec_reset_string_to_parse(), genspec_set_string_to_parse(), IMPORT_DT, init, init_gen_quick_recurse_tables(), IS_EXTERNAL, IS_INLINABLE, MAX_DOMAIN, gen_binding::name, newgen_start_lexer(), Read_spec_mode, Read_spec_performed, return(), true, domain::type, and user().
Referenced by initialize_newgen(), main(), and pips_init().
string gen_read_string | ( | FILE * | file, |
char | upto | ||
) |
returns the allocated line read, whatever its length.
returns NULL on EOF. also some asserts. FC 09/97.
Definition at line 1943 of file genClib.c.
References buf, free(), malloc(), message_assert, and strdup().
Referenced by gtt_read().
GEN_READ_TABULATED reads FILE to update the Gen_tabulated_ table.
Creates if CREATE_P is true.
Definition at line 2334 of file genClib.c.
References genread_parse(), gen_chunk::i, message_assert, newgen_allow_forward_ref, newgen_free, newgen_start_lexer(), and Read_chunk.
Referenced by f95split(), gen_read_and_check_tabulated(), load_entities(), pipsdbm_read_entities(), read_tabulated_db_symbol(), read_tabulated_entity(), and read_tabulated_opcodeClass().
Definition at line 2518 of file genClib.c.
References driver::array_leaf, check_read_spec_performed, env, gen_array_leaf(), gen_null(), gen_trav_obj(), HASH_MAP, hash_pointer, hash_put(), hash_table_clear(), hash_table_make(), driver::leaf_in, driver::leaf_out, driver::null, driver::obj_in, driver::obj_out, obj_table, pointers, pop_gen_trav_env(), push_gen_trav_env(), shared_pointers(), sharing_obj_in(), sharing_simple_in(), driver::simple_in, driver::simple_out, and tabulated_leaf_in().
Definition at line 2420 of file genClib.c.
References cumulated_error_seen, gen_mapc_tabulated(), and void_gen_consistent_p().
|
static |
set to true to stop...
GEN_TRAV_LEAF manages an OBJ value of type BP according to the current driver DR. A leaf is an object (inlined or not).
Definition at line 390 of file genClib.c.
References CHECK_NULL, Domains, fprintf(), fprintf_spaces(), gen_check(), GEN_DBG_CHECK, GEN_DBG_TRAV_LEAF, gen_debug, gen_debug_indent, gen_trav_obj(), gen_trav_stop_recursion, IS_EXTERNAL, IS_INLINABLE, IS_TABULATED, driver::leaf_in, driver::leaf_out, gen_binding::name, and gen_chunk::p.
Referenced by gen_array_leaf(), gen_trav_simple(), write_array_leaf(), and write_this_tabulated().
|
static |
Referenced by gen_allocated_memory(), gen_defined_p(), gen_free(), gen_internal_context_multi_recurse(), gen_local_copy_tree(), gen_sharing_p(), gen_trav_leaf(), gen_write(), gen_write_without_sharing(), and shared_pointers().
"driver" driven recursion in newgen data structures.
note that we do not know the expected type of the object...
Definition at line 570 of file genClib.c.
References ARRAY_DT, domain::ba, CHECK_NULL, CONSTRUCTED_DT, gen_binding::domain, Domains, fatal(), fprintf(), fprintf_spaces(), GEN_DBG_TRAV_OBJECT, gen_debug, gen_debug_indent, gen_trav_obj_constructed(), gen_trav_simple(), gen_trav_stop_recursion, i2a(), IS_TABULATED, LIST_DT, driver::obj_in, driver::obj_out, print_domain(), quick_domain_index, SET_DT, and domain::type.
|
static |
GEN_TRAV_OBJ (the root function) traverses the object OBJ according to the driver DR.
Definition at line 510 of file genClib.c.
References AND_OP, ARROW_OP, domain::co, domain::components, cp, fatal(), domain::first, gen_trav_simple(), gen_trav_stop_recursion, HASH_MAP, i2a(), domain::op, and OR_OP.
Referenced by gen_trav_obj().
GEN_TRAV_SIMPLE traverses a simple OBJ (which is a (CONS *) for a list or points to the first element of an array) of type DP according to the driver DR.
Definition at line 431 of file genClib.c.
References domain::ar, ARRAY_DT, driver::array_leaf, array_size(), domain::ba, BASIS_DT, cons::car, cons::cdr, CHECK_NULL, domain::constructand, domain::dimensions, domain::element, fatal(), fprintf(), fprintf_spaces(), GEN_DBG_TRAV_SIMPLE, gen_debug, gen_debug_indent, gen_trav_leaf(), gen_trav_stop_recursion, i2a(), gen_chunk::l, domain::li, LIST_DT, gen_chunk::p, print_domain(), domain::se, SET_DT, SET_MAP, driver::simple_in, driver::simple_out, gen_chunk::t, and domain::type.
Referenced by gen_trav_obj(), and gen_trav_obj_constructed().
GEN_TYPE returns the domain number for the object in argument.
FC 29/12/94
Definition at line 82 of file genClib.c.
References check_domain, gen_chunk_undefined_p, gen_chunk::i, and message_assert.
Referenced by pipsdbm_consistent_statement_function(), and update_object_for_module().
backwards conversion
Definition at line 2160 of file genClib.c.
References gtt_t::actual_to_old, fatal(), gtt_current_table, MAX_DOMAIN, and message_assert.
Referenced by gen_write_tabulated(), write_leaf_in(), and write_obj_in().
void gen_type_translation_default | ( | void | ) |
Definition at line 2180 of file genClib.c.
References gen_type_translation_reset(), gtt_current_table, gtt_make(), and gtt_table_identity().
Referenced by gen_read_spec().
forwards conversion
Definition at line 2147 of file genClib.c.
References fatal(), gtt_current_table, MAX_DOMAIN, message_assert, and gtt_t::old_to_actual.
Referenced by read_external().
void gen_type_translation_read | ( | string | filename | ) |
set current type translation table according to file
Definition at line 2189 of file genClib.c.
References gen_type_translation_reset(), gtt_current_table, and gtt_read().
Referenced by load_meta_data().
void gen_type_translation_reset | ( | void | ) |
Definition at line 2171 of file genClib.c.
References free(), and gtt_current_table.
Referenced by gen_type_translation_default(), and gen_type_translation_read().
void gen_type_translation_write | ( | string | filename | ) |
Definition at line 2195 of file genClib.c.
References gtt_current_table, gtt_write(), and message_assert.
Referenced by save_meta_data().
void gen_write | ( | FILE * | fd, |
gen_chunk * | obj | ||
) |
GEN_WRITE writes the OBJect on the stream FD.
Sharing is managed (the number of which is printed before the object.)
Definition at line 1745 of file genClib.c.
References driver::array_leaf, check_read_spec_performed, fputi(), gen_null(), gen_trav_obj(), driver::leaf_in, driver::leaf_out, driver::null, driver::obj_in, driver::obj_out, pop_gen_trav_env(), push_gen_trav_env(), shared_number, shared_pointers(), driver::simple_in, driver::simple_out, user_file, write_array_leaf(), write_leaf_in(), write_null(), write_obj_in(), write_obj_out(), write_simple_in(), and write_simple_out().
Referenced by gen_consistent_p(), gfc2pips_namespace(), initialize_newgen(), pipsdbm_write_statement_function(), pipsdbm_write_statement_mapping(), write_abc_checked(), write_action(), write_action_kind(), write_alias_association(), write_alias_associations(), write_align(), write_alignmap(), write_alignment(), write_application(), write_approximation(), write_area(), write_array_dimension_checked(), write_assignment(), write_atom(), write_attachee(), write_attachment(), write_attachments(), write_basic(), write_bdt(), write_bound_pair(), write_c_parser_context(), write_call(), write_call_site(), write_callees(), write_cast(), write_cell(), write_cell_interpretation(), write_cell_relation(), write_cell_relations(), write_chain(), write_clone_context(), write_code(), write_communication(), write_comp_desc(), write_comp_desc_set(), write_comp_sec(), write_complexity(), write_conditional(), write_cone(), write_conflict(), write_constant(), write_context_info(), write_control(), write_controlmap(), write_dad_struct(), write_dag(), write_dagvtx(), write_data(), write_data_status(), write_database(), write_dataflow(), write_dataval(), write_datavar(), write_db_owned_resources(), write_db_resource(), write_db_resources(), write_db_status(), write_descriptor(), write_dfg_arc_label(), write_dfg_vertex_label(), write_dg_arc_label(), write_dg_vertex_label(), write_dimension(), write_dimension_checked(), write_distribute(), write_distributemap(), write_distribution(), write_dummy(), write_dynamic_check(), write_dynamic_status(), write_effect(), write_effects(), write_effects_classes(), write_entities(), write_entity_effects(), write_entity_entities(), write_entity_int(), write_entity_status(), write_entity_task_buffers(), write_entity_to_entity(), write_entitymap(), write_equivalences(), write_evaluation(), write_execution(), write_expression(), write_expressionwithlevel(), write_extension(), write_extensions(), write_forloop(), write_formal(), write_function(), write_functional(), write_gap(), write_gexpression(), write_graph(), write_hpf_newdecl(), write_hpf_newdecls(), write_hpfc_reductions(), write_hpfc_status(), write_ifcount(), write_instruction(), write_interpreted_cell(), write_interval_vertex_label(), write_language(), write_leaf_label(), write_lexpressionwithlevel(), write_lisp_expression(), write_loop(), write_makefile(), write_map_effect_bool(), write_map_effect_step_point(), write_map_entity_int(), write_match(), write_matchTree(), write_matchTreeSons(), write_memory_mapping(), write_message(), write_mode(), write_multitest(), write_newdeclmap(), write_normalized(), write_numbers_status(), write_opcode(), write_operator_id_tree(), write_overlap(), write_overlapsmap(), write_owner(), write_parameter(), write_path_selector(), write_path_selectors(), write_pattern(), write_patternArg(), write_patternx(), write_persistant_expression_to_effects(), write_persistant_expression_to_entity(), write_persistant_statement_to_cluster(), write_persistant_statement_to_control(), write_persistant_statement_to_int(), write_persistant_statement_to_statement(), write_placement(), write_plc(), write_points_to(), write_points_to_graph(), write_points_to_list(), write_pragma(), write_predicate(), write_preference(), write_property(), write_pstatement(), write_pstatement_reductions(), write_qualifier(), write_quast(), write_quast_leaf(), write_quast_value(), write_ram(), write_range(), write_rangecount(), write_real_resource(), write_recursive_selector(), write_reduced_loops(), write_reduction(), write_reduction_operator(), write_reductionInfo(), write_reductions(), write_ref_temp(), write_reference(), write_remapping(), write_renaming(), write_resource(), write_rtype(), write_rule(), write_scc(), write_sccflags(), write_sccs(), write_schedule(), write_sentence(), write_sequence(), write_sesam_buffers_processing_context(), write_sexpression(), write_simdstatement(), write_simple_section(), write_sizeofexpression(), write_statement(), write_statement_cell_relations(), write_statement_effects(), write_statement_entities(), write_statement_points_to(), write_statement_renamings(), write_statement_task(), write_static_control(), write_status(), write_step_clause(), write_step_comm(), write_step_directive(), write_step_directives(), write_step_point(), write_storage(), write_style(), write_subscript(), write_successor(), write_symbolic(), write_synchronization(), write_syntax(), write_task(), write_task_buffers(), write_test(), write_text(), write_tiling(), write_transformation(), write_transformer(), write_type(), write_ubs(), write_ubs_check(), write_unformatted(), write_unstructured(), write_value(), write_var_val(), write_varcount(), write_variable(), write_vertex(), write_virtual_resource(), write_vtxcontent(), write_whileloop(), and write_word_to_attachments().
GEN_WRITE_TABULATED writes the tabulated object TABLE on FD.
Sharing is managed.
headers: #shared, tag, domain number,
restore the index sign which was changed to tag as seen...
Definition at line 1866 of file genClib.c.
References driver::array_leaf, change_sign(), check_read_spec_performed, gen_binding::domain, Domains, fputi(), gen_mapc_tabulated(), gen_null(), gen_tabulated_fake_object_hack(), gen_type_translation_actual_to_old(), driver::leaf_in, driver::leaf_out, driver::null, driver::obj_in, driver::obj_out, pop_gen_trav_env(), push_gen_trav_env(), shared_number, shared_pointers(), driver::simple_in, driver::simple_out, user_file, write_array_leaf(), write_null(), write_obj_in(), write_obj_out(), write_simple_in(), write_simple_out(), write_tabulated_leaf_in(), write_this_tabulated(), wtt_bp, and wtt_dr.
Referenced by f95split(), save_entities(), write_tabulated_db_symbol(), write_tabulated_entity(), and write_tabulated_opcodeClass().
void gen_write_without_sharing | ( | fd | , |
obj | |||
) |
GEN_WRITE_WITHOUT_SHARING writes the OBJect on the stream FD.
Sharing is NOT managed.
Definition at line 1777 of file genClib.c.
References driver::array_leaf, check_read_spec_performed, gen_array_leaf(), gen_null(), gen_trav_obj(), hash_table_free(), driver::leaf_in, driver::leaf_out, driver::null, driver::obj_in, driver::obj_out, obj_table, driver::simple_in, driver::simple_out, user_file, write_leaf_in(), write_null(), write_obj_in(), write_obj_out(), write_simple_in(), and write_simple_out().
void genspec_lex_destroy | ( | ) |
void genspec_reset_string_to_parse | ( | void | ) |
Definition at line 839 of file genspec_lex.c.
References string_to_parse.
Referenced by gen_read_spec().
void genspec_set_string_to_parse | ( | char * | s | ) |
Definition at line 838 of file genspec_lex.c.
References string_to_parse.
Referenced by gen_read_spec().
|
static |
returns a decision table for the given domain.
demand driven definition of the table.
Definition at line 3062 of file genClib.c.
References check_domain, decision_table_undefined, DecisionTables, and initialize_domain_DecisionTables().
Referenced by gen_internal_context_multi_recurse().
== simplified lookup? returns the index of domain name if found, looking up from i.
-1 if not found.
Definition at line 1997 of file genClib.c.
References Domains, MAX_DOMAIN, and same_string_p.
Referenced by gtt_read().
|
static |
returns an allocated and initialized translation table...
Definition at line 1966 of file genClib.c.
References alloc().
Referenced by gen_type_translation_default(), and gtt_read().
read and setup a table from a file
temporary data structure.
set to 0
READ FILE
read data
quick check for identity
identical stuff, ok!
fprintf(stderr, "same table...\n");
else fprintf(stderr, "not same at %d: '%s':%d vs '%s':%d\n", i, items[i].name, items[i].number, Domains[i].name, i);
ELSE build conversion table... order is reversed so that dubbed externals are given the least number.
maybe some domains where not found, give them a new number... if these number are to be used, the table should be saved.
debug
Definition at line 2017 of file genClib.c.
References gtt_t::actual_to_old, Domains, fatal(), first_available(), fprintf(), gen_read_string(), get_domain_number(), gtt_make(), gtt_table_identity(), gtt_table_init(), MAX_DOMAIN, gtt_t::old_to_actual, and same_string_p.
Referenced by gen_type_translation_read().
|
static |
Definition at line 1982 of file genClib.c.
References gtt_t::actual_to_old, gtt_t::identity, MAX_DOMAIN, and gtt_t::old_to_actual.
Referenced by gen_type_translation_default(), and gtt_read().
|
static |
Definition at line 1971 of file genClib.c.
References gtt_t::actual_to_old, gtt_t::identity, MAX_DOMAIN, and gtt_t::old_to_actual.
Referenced by gtt_read().
writes what the previous reads...
Definition at line 2132 of file genClib.c.
References gtt_t::actual_to_old, Domains, fprintf(), MAX_DOMAIN, message_assert, and gen_binding::name.
Referenced by gen_type_translation_write().
INIT_ARRAY returns a freshly allocated array initialized according to the information in its domain DP.
OSTRICT
Definition at line 169 of file genClib.c.
References alloc(), domain::ar, array_size(), domain::dimensions, and gen_chunk_undefined.
Referenced by gen_alloc().
|
static |
GEN_READ_SPEC reads the specifications.
called by gen_read_spec, should be called by a gen_init()
This has to be used – before – any utilization of manipulation functions.
number_of_domains is first set
Definition at line 3036 of file genClib.c.
References domain::ba, check_read_spec_performed, Domains, fprintf(), GEN_DBG_RECURSE, gen_debug, initialize_DecisionTables(), initialize_DirectDomainsTable(), MAX_DOMAIN, number_of_domains, domain::type, and UNDEF_DT.
Referenced by gen_read_spec().
|
static |
Definition at line 3025 of file genClib.c.
References decision_table_undefined, DecisionTables, and MAX_DOMAIN.
Referenced by init_gen_quick_recurse_tables().
|
static |
?
first put falses
Definition at line 2991 of file genClib.c.
References check_read_spec_performed, DirectDomainsTable, gen_binding::domain, Domains, fprintf(), GEN_DBG_RECURSE, gen_debug, initialize_domain_DirectDomainsTable(), gen_binding::name, number_of_domains, print_decision_table(), and Tabulated_bp.
Referenced by init_gen_quick_recurse_tables().
|
static |
demand driven computation of the decision table to scan domain.
this table is computed by a closure from the initial type matrix
the algorithm is straightforward. tabulated domains are skipped. worst case complexity if O(n^2) for each requested domain. the closure is shorten because already computed tables are used.
init with direct inclusions
now the closure is computed
look for the next domain to include
none
cannot come from tabulated domains... this should be discussed, or put as a parameter...
shorten
false : not_used[j]
Definition at line 2880 of file genClib.c.
References decision_table_undefined, DecisionTables, DirectDomainsTable, Domains, fprintf(), GEN_DBG_RECURSE, gen_debug, IS_TABULATED, number_of_domains, and print_decision_table().
Referenced by get_decision_table().
walks thru the domain to tag all types for target.
some domains are NULL
obvious: don't go inside externals!
abort() ? true (safe) ?
nothing is done
Definition at line 2952 of file genClib.c.
References abort, ARRAY_DT, domain::ba, BASIS_DT, domain::co, domain::components, CONSTRUCTED_DT, DirectDomainsTable, Domains, domain::element, EXTERNAL_DT, fprintf(), GEN_DBG_RECURSE, gen_debug, IMPORT_DT, LIST_DT, gen_binding::name, domain::se, SET_DT, domain::type, and UNDEF_DT.
Referenced by initialize_DirectDomainsTable().
DOMAIN_INDEX returns the index in the Domain table for object OBJ.
Definition at line 105 of file genClib.c.
References fatal(), gen_chunk_undefined, gen_chunk::i, MAX_DOMAIN, and message_assert.
void newgen_start_lexer | ( | FILE * | in | ) |
starting the scanner.
Definition at line 822 of file genread_lex.c.
References newgen_char_number, newgen_col_number, newgen_lex_number, newgen_line_number, and yyin.
Referenced by gen_read(), gen_read_spec(), and gen_read_tabulated().
|
static |
not reached
Definition at line 2387 of file genClib.c.
References black_hole, and fatal().
Referenced by gen_consistent_p(), and gen_defined_p().
|
static |
GEN_LOCAL_FREE frees the object OBJ with or without KEEPing the sharing.
???
just to avoid a gcc warning
Definition at line 950 of file genClib.c.
References domain::ar, ARRAY_DT, array_undefined, domain::ba, BASIS_DT, fatal(), gen_chunk::i, i2a(), gen_chunk::l, domain::li, LIST_DT, list_undefined, gen_chunk::p, domain::persistant, domain::se, SET_DT, set_undefined, gen_chunk::t, and domain::type.
Referenced by gen_free(), and sharing_simple_in().
|
static |
Definition at line 827 of file genClib.c.
References env, first_seen, gen_trav_env_top, gen_trav_envs, hash_table_free(), message_assert, newgen_free, obj_table, seen_once, and shared_number.
Referenced by gen_defined_p(), gen_sharing_p(), gen_write(), and gen_write_tabulated().
|
static |
Definition at line 2864 of file genClib.c.
References Domains, fprintf(), and MAX_DOMAIN.
Referenced by initialize_DirectDomainsTable(), and initialize_domain_DecisionTables().
|
static |
Definition at line 808 of file genClib.c.
References alloc(), env, first_seen, gen_trav_env_top, gen_trav_envs, hash_pointer, hash_table_make(), MAX_GEN_TRAV_ENV, MAX_SHARED_OBJECTS, message_assert, obj_table, seen_once, and shared_number.
Referenced by gen_defined_p(), gen_sharing_p(), gen_write(), and gen_write_tabulated().
true if obj was already seen in this recursion.
also record ancestor on the fly.
Definition at line 3144 of file genClib.c.
References current_mrc, hash_defined_p(), hash_put(), multi_recurse::seen, stack_head(), and multi_recurse::upwards.
Referenced by quick_multi_recurse_obj_in().
|
static |
Definition at line 3154 of file genClib.c.
References multi_recurse::always_recurse, check_domain, multi_recurse::context, multi_recurse::current, current_mrc, multi_recurse::decisions, multi_recurse::domains, Domains, multi_recurse::filters, GO, gen_chunk::i, IS_TABULATED, multi_recurse::previous, quick_domain_index, quick_multi_already_seen_p(), stack_push(), and multi_recurse::upwards.
Referenced by gen_internal_context_multi_recurse().
|
static |
Definition at line 3199 of file genClib.c.
References check_domain, multi_recurse::context, multi_recurse::current, current_mrc, multi_recurse::domains, gen_chunk::i, message_assert, multi_recurse::previous, multi_recurse::rewrites, stack_pop(), and multi_recurse::upwards.
Referenced by gen_internal_context_multi_recurse().
Definition at line 3224 of file genClib.c.
References multi_recurse::always_recurse, ARRAY_DT, array_undefined, domain::ba, BASIS_DT, current_mrc, multi_recurse::decisions, multi_recurse::domains, Domains, domain::element, fatal(), i2a(), gen_chunk::l, LIST_DT, list_undefined, gen_chunk::p, domain::persistant, domain::se, SET_DT, set_undefined, gen_chunk::t, true, and domain::type.
Referenced by gen_internal_context_multi_recurse().
|
static |
SHARED_OBJ manages the OBJect modulo sharing (the OBJ_TABLE has to be set first, see above).
If the object isn't shared, don't do nothing. else, if that's the first appearance, call FIRST and go on, else call OTHERS. If the obj_table isn't defined, recurse.
Definition at line 764 of file genClib.c.
References first_seen, FIRST_SEEN, GO, hash_get(), HASH_UNDEFINED_VALUE, hash_update(), message_assert, obj_table, seen_once, and shared_number.
Referenced by sharing_obj_in(), and write_obj_in().
SHARED_OBJ_IN introduces an object OBJ in the OBJ_TABLE.
If it is already in the table, don't recurse (at least, if you want to avoid an infinite loop) and give it a number. Else recurse.
Definition at line 670 of file genClib.c.
References first_seen, GO, hash_get(), hash_put(), HASH_UNDEFINED_VALUE, hash_update(), MAX_SHARED_OBJECTS, message_assert, obj_table, seen, and shared_number.
Referenced by shared_pointers().
|
static |
SHARED_POINTERS creates (in OBJ_TABLE) the association between objects and their numbers (!= 0 if sharing).
Inlined values are NOT considered to be shared (neither list and arrays), just objects (i.e. objects which have a user name, a spec in Domains). KEEP says whether the previous sharing table is preserved.
else the obj_table is kept as it is.
Definition at line 734 of file genClib.c.
References driver::array_leaf, gen_array_leaf(), gen_null(), gen_trav_obj(), hash_table_clear(), keep, driver::leaf_in, driver::leaf_out, message_assert, driver::null, driver::obj_in, driver::obj_out, obj_table, shared_number, shared_obj_in(), shared_simple_in(), driver::simple_in, driver::simple_out, and tabulated_leaf_in().
Referenced by gen_defined_p(), gen_sharing_p(), gen_write(), and gen_write_tabulated().
|
static |
just to avoid a gcc warning
Definition at line 693 of file genClib.c.
References domain::ar, ARRAY_DT, domain::ba, BASIS_DT, cons::cdr, fatal(), GO, hash_get(), hash_put(), HASH_UNDEFINED_VALUE, i2a(), gen_chunk::l, domain::li, LIST_DT, list_undefined, message_assert, NIL, obj_table, domain::persistant, domain::se, SET_DT, and domain::type.
Referenced by shared_pointers().
Definition at line 2485 of file genClib.c.
References check_sharing(), Domains, gen_null(), GO, IS_TABULATED, message_assert, quick_domain_index, and shared_obj().
Referenced by gen_sharing_p().
Definition at line 2499 of file genClib.c.
References domain::ba, cons::cdr, check_sharing(), GO, gen_chunk::l, LIST_DT, list_undefined, NIL, persistant_simple_in(), and domain::type.
Referenced by gen_sharing_p().
|
static |
Definition at line 620 of file genClib.c.
References IS_TABULATED, and message_assert.
Referenced by gen_internal_context_multi_recurse(), gen_local_copy_tree(), gen_sharing_p(), and shared_pointers().
|
static |
for side effects only
Definition at line 2415 of file genClib.c.
References gen_consistent_p().
Referenced by gen_tabulated_consistent_p().
|
static |
WRITE_ARRAY_LEAF only writes non-null elements, in a sparse way.
write array index
write array value at index
Definition at line 1703 of file genClib.c.
References fputi(), gen_chunk_undefined, gen_trav_leaf(), IS_EXTERNAL, IS_INLINABLE, gen_chunk::p, and user_file.
Referenced by gen_write(), and gen_write_tabulated().
|
static |
WRITE_DEFINE_SHARED_NODE defines the node whose number is N.
Definition at line 1500 of file genClib.c.
References fputci(), and user_file.
Referenced by write_obj_in().
|
static |
WRITE_LEAF_IN prints the OBJect of type BP.
If it is inlined, prints it according to the format, else recurse.
references are by name. The number may can be changed...
hummm...
Definition at line 1612 of file genClib.c.
References gen_chunk::b, disallow_undefined_tabulated, gen_binding::domain, Domains, domain::ex, gen_chunk::f, fatal(), fprintf(), fputci(), fputi(), gen_chunk_undefined, gen_type_translation_actual_to_old(), GO, HASH_OFFSET, gen_chunk::i, IS_BOOL_TYPE, IS_EXTERNAL, IS_FLOAT_TYPE, IS_INLINABLE, IS_INT_TYPE, IS_STRING_TYPE, IS_TABULATED, IS_UNIT_TYPE, gen_binding::name, gen_chunk::p, gen_chunk::s, user(), user_file, domain::write, and write_string().
Referenced by gen_defined_p(), gen_write(), gen_write_without_sharing(), and write_tabulated_leaf_in().
|
static |
Definition at line 1512 of file genClib.c.
References message_assert, and user_file.
Referenced by gen_write(), gen_write_tabulated(), gen_write_without_sharing(), and write_tabulated_leaf_in().
WRITE_OBJ_IN writes the OBJect of type BP.
We first prints its type (its index in the Domains table), its tag (for OR_OP types) and then ... let's do the recursion.
tabulated number is skipped...
tag...
Definition at line 1522 of file genClib.c.
References ARROW_OP, domain::ba, domain::co, CONSTRUCTED_DT, gen_binding::domain, Domains, EXTERNAL_DT, fatal(), fputci(), fputi(), gen_type_translation_actual_to_old(), GO, IS_TABULATED, message_assert, gen_binding::name, domain::op, OR_OP, quick_domain_index, shared_obj(), domain::type, user_file, write_define_shared_node(), and write_shared_node().
Referenced by gen_defined_p(), gen_write(), gen_write_tabulated(), and gen_write_without_sharing().
|
static |
WRITE_OBJ_OUT is done when the OBJect (of type BP) has been printed.
Just close the opening parenthese.
Definition at line 1560 of file genClib.c.
References ARROW_OP, domain::ba, domain::co, CONSTRUCTED_DT, gen_binding::domain, message_assert, domain::op, domain::type, and user_file.
Referenced by gen_defined_p(), gen_write(), gen_write_tabulated(), and gen_write_without_sharing().
|
static |
|
static |
WRITE_SIMPLE_IN is done before printing a simple OBJect of type DP.
The sharing of basis objects will be done later.
Definition at line 1668 of file genClib.c.
References domain::ar, ARRAY_DT, array_size(), array_undefined, domain::ba, domain::dimensions, fputci(), GO, gen_chunk::l, LIST_DT, list_undefined, gen_chunk::p, domain::se, SET_DT, set_undefined, gen_chunk::t, domain::type, user_file, and domain::what.
Referenced by gen_defined_p(), gen_write(), gen_write_tabulated(), and gen_write_without_sharing().
WRITE_LEAF_OUT prints the closing parenthesis of (non-basis) simple OBJect of type DP.
RGSUSED
Definition at line 1724 of file genClib.c.
References ARRAY_DT, domain::ba, LIST_DT, message_assert, SET_DT, domain::type, and user_file.
Referenced by gen_defined_p(), gen_write(), gen_write_tabulated(), and gen_write_without_sharing().
|
static |
else
Definition at line 1580 of file genClib.c.
References end, init, string_undefined_p, user(), and user_file.
Referenced by write_leaf_in().
|
static |
WRITE_TABULATED_LEAF_IN prints the OBJect of type BP.
If it is tabulated, then recurse.
boum! why?
fprintf(stderr, "writing %d %s\n", number, (obj->p+HASH_OFFSET)->s);
once written the domain number sign is inverted, to tag the object has been written, so that its definition is not written twice on disk. The second time a simple reference is written instead. beurk. FC.
Definition at line 1809 of file genClib.c.
References fatal(), gen_chunk_undefined, GO, IS_TABULATED, gen_binding::name, gen_chunk::p, user_file, write_leaf_in(), and write_null().
Referenced by gen_write_tabulated().
|
static |
Definition at line 1851 of file genClib.c.
References gen_trav_leaf(), gen_chunk::p, wtt_bp, and wtt_dr.
Referenced by gen_write_tabulated().
|
static |
Definition at line 2562 of file genClib.c.
Referenced by allocated_memory_already_seen_p(), and gen_allocated_memory().
|
static |
used for consistence checking...
Definition at line 2386 of file genClib.c.
Referenced by gen_consistent_p(), gen_defined_p(), and open_black_hole().
|
static |
These functions are used to implement the copying of objects.
A tabulated constructor has to stop recursive duplication.
Definition at line 1050 of file genClib.c.
Referenced by copy_hsearch(), copy_leaf_out(), copy_obj_in(), copy_simple_in(), copy_simple_out(), and gen_local_copy_tree().
|
static |
Definition at line 2394 of file genClib.c.
Referenced by gen_consistent_p(), and gen_tabulated_consistent_p().
|
static |
the current multi recurse driver.
it is cleaner than the gen_recurse version since I added the decisions table without modifying Pierre code, while here I redefined a current status struct that stores everything needed.
Definition at line 3137 of file genClib.c.
Referenced by gen_get_ancestor(), gen_get_current_object(), gen_get_recurse_ancestor(), gen_get_recurse_current_ancestor(), gen_get_recurse_previous_visited_object(), gen_internal_context_multi_recurse(), gen_recurse_stop(), quick_multi_already_seen_p(), quick_multi_recurse_obj_in(), quick_multi_recurse_obj_out(), and quick_multi_recurse_simple_in().
|
static |
returns the number of bytes allocated for a given structure may need additional fonctions for externals...
May be called recursively. If so, already_seen_objects table kept.
Definition at line 2561 of file genClib.c.
Referenced by allocated_memory_leaf_in(), allocated_memory_obj_in(), allocated_memory_simple_in(), gen_allocated_memory(), hash_size_limit(), and tpips_help().
|
static |
Definition at line 2862 of file genClib.c.
Referenced by get_decision_table(), initialize_DecisionTables(), and initialize_domain_DecisionTables().
|
static |
Definition at line 2861 of file genClib.c.
Referenced by initialize_DirectDomainsTable(), initialize_domain_DecisionTables(), and initialize_domain_DirectDomainsTable().
Default option in GEN_WRITE.
Definition at line 74 of file genClib.c.
Referenced by write_leaf_in().
|
static |
Definition at line 2473 of file genClib.c.
Referenced by check_sharing(), debug_on_function(), env2int(), gen_sharing_p(), get_linear_convex_hull_timeout(), linear_require_gmp(), main(), pips_check_c(), pips_check_fortran(), pips_check_syntax(), pop_gen_trav_env(), pop_timeout_env(), push_gen_trav_env(), push_timeout_env(), and usegmp().
|
extern |
Have we seen a user error somewhere ?
Definition at line 76 of file build.c.
Referenced by build(), gen_consistent_p(), gen_defined_p(), and init().
|
static |
Definition at line 634 of file genClib.c.
Referenced by pop_gen_trav_env(), push_gen_trav_env(), shared_obj(), and shared_obj_in().
|
static |
These functions are used to implement the freeing of objects.
A tabulated constructor has to stop recursive freeing.
Definition at line 848 of file genClib.c.
Referenced by free_already_seen_p(), gen_free(), gen_free_tabulated(), and gen_full_free_list().
int gen_debug = 0 |
The debug flag can be changed by the user to check genClib code.
Function interface for user applications.
If you set gen_debug dynamically with gdb, do not forget to set gen_debug_indent to a positive enough value to avoid problems when gen_trav_obj() moves upwards the point it was when gen_debug was set
Definition at line 69 of file genClib.c.
Referenced by do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), full_loop_unroll(), gen_consistent_p(), gen_trav_leaf(), gen_trav_obj(), gen_trav_simple(), init_gen_quick_recurse_tables(), initialize_DirectDomainsTable(), initialize_domain_DecisionTables(), and initialize_domain_DirectDomainsTable().
|
static |
Definition at line 70 of file genClib.c.
Referenced by gen_trav_leaf(), gen_trav_obj(), and gen_trav_simple().
|
static |
Definition at line 799 of file genClib.c.
Referenced by pop_gen_trav_env(), and push_gen_trav_env().
struct gen_trav_env gen_trav_envs[ MAX_GEN_TRAV_ENV ] |
Referenced by pop_gen_trav_env(), and push_gen_trav_env().
Definition at line 384 of file genClib.c.
Referenced by gen_array_leaf(), gen_internal_context_multi_recurse(), gen_recurse_stop(), gen_trav_leaf(), gen_trav_obj(), gen_trav_obj_constructed(), and gen_trav_simple().
|
extern |
lex files
Referenced by gen_read_spec().
FILE * genspec_out |
Definition at line 52 of file genClib.c.
Referenced by gen_read_spec().
|
static |
global translation table.
Definition at line 1938 of file genClib.c.
Referenced by gen_type_translation_actual_to_old(), gen_type_translation_default(), gen_type_translation_old_to_actual(), gen_type_translation_read(), gen_type_translation_reset(), and gen_type_translation_write().
|
static |
Definition at line 2858 of file genClib.c.
Referenced by gen_internal_context_multi_recurse(), init_gen_quick_recurse_tables(), initialize_DirectDomainsTable(), and initialize_domain_DecisionTables().
|
static |
The OBJ_TABLE maps objects to addresses within the arrays FIRST_SEEN and SEEN_ONCE.
In the first case, if the address is FIRST_SEEN, then this is the first occurence of the object; if it has a non-zero offset i, then it is the i-th shared object seen so far. This offset is used in SHARED_OBJ to decide which number to print and update the OBJ_TABLE to associate the object to SEEN_ONCE+i so that latter references can be correctly generated.
Definition at line 648 of file genClib.c.
Referenced by current_shared_obj_table_size(), gen_sharing_p(), gen_write_without_sharing(), pop_gen_trav_env(), push_gen_trav_env(), shared_obj(), shared_obj_in(), shared_pointers(), and shared_simple_in().
|
static |
GEN_SHARING_P checks whether OBJ1 uses objects (except tabulated) or CONS cells that appear in OBJ2.
Definition at line 2472 of file genClib.c.
Referenced by check_sharing(), and gen_sharing_p().
int Read_spec_mode |
extern int Current_first ;
Definition at line 60 of file genClib.c.
Referenced by gen_read_spec(), main(), new_binding(), and reconnect().
Definition at line 61 of file genClib.c.
Referenced by gen_read_spec().
|
static |
Definition at line 635 of file genClib.c.
Referenced by pop_gen_trav_env(), push_gen_trav_env(), and shared_obj().
|
static |
The running counter of shared objects number.
Definition at line 662 of file genClib.c.
Referenced by gen_write(), gen_write_tabulated(), pop_gen_trav_env(), push_gen_trav_env(), shared_obj(), shared_obj_in(), and shared_pointers().
struct gen_binding * Tabulated_bp |
pointer to tabulated domain hack
hack to walk thru tabulateds...
Definition at line 58 of file genClib.c.
Referenced by compile(), gen_tabulated_fake_object_hack(), init(), initialize_DirectDomainsTable(), and print_domains().
|
static |
These functions implements the writing of objects.
USER_FILE is used by driver functions (sorry, no closure in C).
Definition at line 1485 of file genClib.c.
Referenced by gen_defined_p(), gen_write(), gen_write_tabulated(), gen_write_without_sharing(), get_new_user_file(), insert_check_alias_before_statement(), insert_flag_before_call_site(), insert_test_before_caller(), insert_test_before_statement(), pips_log_alist(), pips_log_desc(), pips_log_display(), pips_log_file(), pips_log_func(), pips_log_xml(), preprocessed_to_user_file(), step_install(), unsplit_internal(), used_before_set(), write_array_leaf(), write_define_shared_node(), write_leaf_in(), write_null(), write_obj_in(), write_obj_out(), write_shared_node(), write_simple_in(), write_simple_out(), write_string(), and write_tabulated_leaf_in().
|
static |
Definition at line 1849 of file genClib.c.
Referenced by gen_write_tabulated(), and write_this_tabulated().
|
static |
Definition at line 1850 of file genClib.c.
Referenced by gen_write_tabulated(), and write_this_tabulated().