PIPS
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include "genC.h"
#include "database.h"
#include "linear.h"
#include "ri.h"
#include "properties.h"
#include "ri-util.h"
#include "pipsdbm.h"
#include "pipsmake.h"
#include "misc.h"
Go to the source code of this file.
Functions | |
static void | delete_derived_resources () |
void | save_active_phases (void) |
activate.c More... | |
void | retrieve_active_phases (void) |
bool | active_phase_p (const char *phase) |
bool | saved_active_phase_p (const char *phase) |
Debugging function. More... | |
void | fprint_activated (FILE *fd) |
string | active_phase_for_resource (string res) |
return the phase which would be used to build a given resource. More... | |
const char * | activate_phase (const char *phase) |
const char * | activate (const char *phase) |
bool | activate_phases (void) |
Use property ACTIVE_PHASES to active the phases required by the user. More... | |
void | activate_language (language l) |
Choose the right combination of activate and setproperty for a given language. More... | |
static void | get_more_derived_resources (string vrn, set set_of_res) |
bool | rule_use_resource_produced (rule r) |
Test if a rule uses a resource it produces. More... | |
static void | delete_derived_resources (virtual_resource res) |
Variables | |
static list | saved_active_phases = NIL |
const char* activate | ( | const char * | phase | ) |
phase | hase |
Definition at line 214 of file activate.c.
References activate_phase(), and pips_user_error.
Referenced by activate_language(), make_pre_post_transformation(), options_select(), select_rule(), and update_options().
void activate_language | ( | language | l | ) |
Choose the right combination of activate and setproperty for a given language.
This is not really compatible with the litterate programming of pipsmake-rc.tex, where this information should be encoded.
Usual properties for Fortran
Usual properties for Fortran 90/95
Usual properties for C
The language is unknown
Definition at line 254 of file activate.c.
References activate(), active_phase_p(), language_c_p, language_fortran95_p, language_fortran_p, pips_user_warning, and set_bool_property().
Referenced by add_a_file(), and create_workspace().
const char* activate_phase | ( | const char * | phase | ) |
find rule that describes phase
phase | hase |
Definition at line 124 of file activate.c.
References active_phase_p(), CAR, db_get_current_workspace_name(), db_unput_resources(), debug_off, debug_on, delete_derived_resources(), find_rule_by_phase(), find_rule_by_resource(), FOREACH, free(), gen_length(), get_bool_property(), makefile_active_phases, MAPL, owner_callees_p, owner_callers_p, owner_select_p, parse_makefile(), pips_assert, pips_debug, pips_user_warning, rule_phase, rule_produced, rule_required, rule_undefined, same_string_p, strdup(), STRING, VIRTUAL_RESOURCE, virtual_resource_name, and virtual_resource_owner.
Referenced by activate(), and activate_phases().
bool activate_phases | ( | void | ) |
Use property ACTIVE_PHASES to active the phases required by the user.
Definition at line 224 of file activate.c.
References activate_phase(), active_phase_p(), free(), get_string_property(), pips_debug, same_string_p, and strdup().
Referenced by create_workspace().
return the phase which would be used to build a given resource.
res | es |
Definition at line 119 of file activate.c.
References find_rule_by_resource(), and rule_phase.
bool active_phase_p | ( | const char * | phase | ) |
phase | hase |
Definition at line 80 of file activate.c.
References FOREACH, makefile_active_phases, parse_makefile(), same_string_p, and STRING.
Referenced by activate_language(), activate_phase(), activate_phases(), make_pre_post_transformation(), points_to_unary_operation_to_transformer(), and ProcessEntry().
|
static |
|
static |
Get the set of virtual resource to destroy
Definition at line 382 of file activate.c.
References delete_named_resources(), get_more_derived_resources(), set_free(), set_make(), SET_MAP, set_pointer, and virtual_resource_name.
void fprint_activated | ( | FILE * | fd | ) |
fd | d |
Definition at line 110 of file activate.c.
References FOREACH, fprintf(), makefile_active_phases, parse_makefile(), and STRING.
Referenced by retrieve_active_phases(), and select_rule().
If the given resource is not in the set
put it into the set
For all active phases
Search in the required rules
If the resource names are equal
make a recursion for all the produced rules
Here, there is no infinite loop problem with rule producing a ressource they require, because the resource has already been had to the set
Definition at line 294 of file activate.c.
References CAR, debug(), find_rule_by_phase(), makefile_active_phases, MAPL, parse_makefile(), pips_debug, rule_produced, rule_required, rule_use_resource_produced(), same_string_p, set_add_element(), set_belong_p(), STRING, VIRTUAL_RESOURCE, and virtual_resource_name.
Referenced by delete_derived_resources().
void retrieve_active_phases | ( | void | ) |
Definition at line 58 of file activate.c.
References fprint_activated(), gen_free_string_list(), ifdebug, makefile_active_phases, NIL, parse_makefile(), and saved_active_phases.
Referenced by apply(), concurrent_apply(), make(), safe_concurrent_apply(), and safe_do_something().
Test if a rule uses a resource it produces.
find resource res that is produced by phase
owner vro = virtual_resource_owner(vr);
We DO check callers and callees (DB,08/96)
if ( owner_callers_p(vro) || owner_callees_p(vro) ) {} else
Definition at line 353 of file activate.c.
References CAR, MAPL, rule_produced, rule_required, same_string_p, VIRTUAL_RESOURCE, and virtual_resource_name.
Referenced by get_more_derived_resources().
void save_active_phases | ( | void | ) |
Definition at line 49 of file activate.c.
References gen_copy_string_list(), makefile_active_phases, NIL, parse_makefile(), and saved_active_phases.
Referenced by apply(), concurrent_apply(), and make().
bool saved_active_phase_p | ( | const char * | phase | ) |
Debugging function.
phase | hase |
Definition at line 93 of file activate.c.
References ENDP, FOREACH, fprintf(), same_string_p, saved_active_phases, and STRING.
Definition at line 47 of file activate.c.
Referenced by retrieve_active_phases(), save_active_phases(), and saved_active_phase_p().