25 #include "pips_config.h"
64 if(!prevent_suffix || version!=0)
105 if (!in_module_1 || !in_module_2) {
106 pips_debug(8,
"variable %s not in declarations of %s\n",
111 return (in_module_1 && in_module_2);
122 "variable non declaree %s\n",
135 "variable non declaree %s\n",
160 pips_debug(8,
"ajout de la variable symbolique %s au module %s\n",
187 (void)
fprintf(stderr,
"ajout de la variable symbolique %s au module %s\n",
226 string end_of_comment = the_comments;
236 if ((next_line = strchr(end_of_comment,
'\n')) != NULL
237 || *end_of_comment !=
'\0')
239 end_of_comment = next_line + 1;
244 pips_assert(
"get_end_of_header_comments found only comments!",
247 return end_of_comment;
257 string end_of_comment;
258 string extracted_comment;
264 length = end_of_comment - the_comments;
266 (void) strncpy(extracted_comment, the_comments, length);
267 extracted_comment[length] =
'\0';
278 string old_extracted_comments;
279 string extracted_comments =
strdup(
"");
289 next_line = strchr(
comment,
'\n');
293 if (next_line == NULL)
301 the_comment[next_line -
comment + 1] =
'\0';
303 old_extracted_comments = extracted_comments;
307 free(old_extracted_comments);
311 if (next_line == NULL)
373 while((l=*s++)!=
'\0')
568 for(c_name = strtok(ds,
" ") ;
570 c_name=strtok(NULL,
" ") ) {
type copy_type(type p)
TYPE.
bool entity_defined_p(entity p)
value copy_value(value p)
VALUE.
storage copy_storage(storage p)
STORAGE.
sentence make_sentence(enum sentence_utype tag, void *val)
static reference ref
Current stmt (an integer)
bool entity_is_argument_p(entity e, cons *args)
void dump_arguments(cons *args)
entity_name is a macro, hence the code replication
bool static_module_name_p(const char *name)
Check if the given name is a static module name.
bool compilation_unit_p(const char *module_name)
The names of PIPS entities carry information about their nature.
static void comment(string_buffer code, spoc_hardware_type hw, dagvtx v, int stage, int side, bool flip)
void gen_multi_recurse(void *o,...)
Multi recursion visitor function.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
list gen_nreverse(list cp)
reverse a list in place
#define NIL
The empty list (nil in Lisp)
list gen_copy_seq(list l)
Copy a list structure.
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define list_undefined
Undefined list definition :-)
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_user_warning
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
#define MODULE_SEP_STRING
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define same_string_p(s1, s2)
void * gen_find_tabulated(const char *, int)
#define string_undefined_p(s)
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
static const char * prefix
#define make_entity(n, t, s, i)
#define entity_declarations(e)
MISC: newgen shorthands.
bool entity_special_area_p(entity e)
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
entity FindEntity(const char *package, const char *name)
Retrieve an entity from its package/module name and its local name.
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
bool dummy_parameter_entity_p(entity p)
is p a dummy parameter?
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
code entity_code(entity e)
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
const char * module_local_name(entity e)
Returns the module local user name.
bool entity_module_p(entity e)
const char * entity_module_name(entity e)
See comments about module_name().
static string get_end_of_header_comments(string the_comments)
Look for the end of header comments:
entity any_function_to_return_value(entity m)
Same as function_to_return_value(), but returns value_undefined when m is a C void function or a Fort...
bool variable_declaration_coherency_p(entity module, statement st)
list module_all_declarations(entity m)
The function itself is not in its declarations.
sentence get_header_comments(entity module)
Get the header comments (before PROGRAM, FUNCTION,...) from the text declaration:
string build_new_top_level_module_name(const char *prefix, bool prevent_suffix)
Get a new name for a module built from a prefix.
bool c_language_module_p(entity m)
list string_to_user_modules(const char *s)
Build a list of functions from a string s containing SPACE separated function names.
void symbolic_constant_declaration_verify(call c)
list module_formal_parameters(entity func)
list module_formal_parameters(entity func) input : an entity representing a function.
void variable_declaration_verify(reference ref)
static bool module_coherent_p
To have asprintf():
void add_non_declared_reference_to_declaration(reference ref)
entity generic_function_to_return_value(entity m, bool safe_p)
Returns the entity rv that carries the value returned by module m, when m is not a C void function or...
bool static_module_p(entity e)
Check if the given module entity is a static module.
bool return_value_p(entity v)
Is entity v the return value of some function?
bool void_function_p(entity m)
Check if m is a C void function or a Fortran subroutine.
entity function_to_return_value(entity m)
Returns the entity rv that carries the value returned by module m, when m is not a C void function or...
bool fortran95_language_module_p(entity m)
void add_symbolic_constant_to_declaration(call c)
bool fortran_language_module_p(entity m)
int module_to_declaration_length(entity func)
Number of user declaration lines for a module.
bool function_return_value_p(entity v, entity f)
Is entity v the return value of function f?
bool compilation_unit_entity_p(entity e)
Check if the given module entity is a compilation unit.
static bool x_language_module_p(entity m, unsigned int x)
Simplified versions of c_module_p() and fortran_module_p().
list declaration_supporting_references(list dl)
Find all references in the declaration list.
sentence get_declaration_comments(entity module)
Get all the declaration comments, that are comments from the PROGRAM, FUNCTION,...
bool variable_in_module_p2(entity v, entity m)
static entity checked_module
bool comment_string_p(const string)
Test if a string can be a Fortran 77 comment:
list type_supporting_references(list, type)
type entity_basic_concrete_type(entity)
retrieves or computes and then returns the basic concrete type of an entity
type compute_basic_concrete_type(type)
computes a new type which is the basic concrete type of the input type (this new type is not stored i...
#define type_functional_p(x)
#define value_undefined_p(x)
#define functional_result(x)
#define storage_formal_p(x)
#define reference_variable(x)
#define type_functional(x)
#define entity_storage(x)
#define code_declarations(x)
#define call_domain
newgen_callees_domain_defined
#define entity_undefined_p(x)
#define reference_domain
newgen_range_domain_defined
#define value_symbolic_p(x)
#define value_reference_p(x)
#define code_decls_text(x)
#define entity_domain
newgen_syntax_domain_defined
#define entity_initial(x)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
The structure used to build lists in NewGen.