PIPS
|
#include <stdio.h>
#include <string.h>
#include <setjmp.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "ri-util.h"
#include "effects-util.h"
#include "misc.h"
#include "effects-generic.h"
#include "effects-convex.h"
#include "semantics.h"
#include "transformer.h"
#include "pipsdbm.h"
#include "alias-classes.h"
Go to the source code of this file.
Functions | |
static bool | same_reg_ignore_action (region reg1, region reg2) |
tests if reg1 and reg2 are the same, ignoring their action_tags (IN/OUT) but checking their precision (may/exact) More... | |
static bool | member (region reg, list reg_list) |
tests if reg and any member of reg_list are same_reg_ignore_action More... | |
static list | append_reg_if_not_present (list reg_list, region reg) |
adds reg as final element on the end of reg_list unless reg is already present in reg_list i.e. More... | |
static list | union_lists (list initial_reg_list, list additional_list) |
add a copy of each element in additional_list not already present in initial_reg_list to the end of initial_reg_list (ignoring the action) More... | |
static void | compare_other_list (region elem, list other_list) |
global variables IN: rest_list, l_lists global variables modified: rest_list, l_lists More... | |
static void | compare_rest_lists (region elem) |
global variables IN: rest_list, rest_lists, l_lists global variables modified: rest_list, l_lists, rest_lists compares "elem" (the current element from the list currently being made into a class) to each element of each list of "rest_lists" (the other lists not yet made into classes) if a match is found, "other_list" (the other list containing the matching element "other_elem") is appended to "rest_list" (the not yet treated elements from the list currently being made into a class) and "other_list" will no longer be a member of "l_lists" if not, "other_list" is appended to "l_lists" More... | |
static void | make_class_from_list (list reg_list) |
global variables IN: new_class, rest_lists, l_lists global variables modified: new_class, l_lists, rest_lists, rest_list More... | |
static void | unite_lists_containing_same_exact_region () |
global variables IN: l_lists, l_alias_classes global variables modified:class, l_lists, rest_lists, rest_list, l_alias_classes More... | |
static list | compare_heads_rest_lists (region head, list new_list) |
global variables IN: l_alias_lists global variables modified: l_alias_lists compares "head" (the head of the current list) to the head of each list of "rest_lists" (the other lists not yet treated) if a match is found, "other_list" (the other list containing the matching head "other_head") is appended to "new_list" and "other_list" will no longer be a member of "l_alias_lists" if not, "other_list" is appended to "l_alias_lists" More... | |
static void | unite_lists_with_same_head () |
global variables IN: l_alias_lists, l_lists global variables modified: l_alias_lists, l_lists More... | |
bool | alias_classes (const char *module_name) |
alias_classes.c More... | |
Variables | |
static list | l_alias_lists |
static list | l_alias_classes |
static list | l_lists |
static list | new_class |
static list | rest_list |
static list | rest_lists |
bool alias_classes | ( | const char * | module_name | ) |
ATTENTION: we have to do ALL this just to call print_inout_regions for debug !!
and this to call print_region set_action_interpretation(ACTION_IN,ACTION_OUT);
that's it, but we musn't forget to reset everything below
ifdebug(9) { pips_debug(9,"add list:\n"); print_inout_regions(module_alias_list); }
module_name | odule_name |
Definition at line 514 of file alias_classes.c.
References CONS, db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, EFFECTS, effects_classes_classes, effects_effects, free_value_mappings(), get_current_module_entity(), ifdebug, l_alias_classes, l_alias_lists, l_lists, LIST, local_name_to_top_level_entity(), make_effects_classes(), MAP, module, module_name(), module_to_value_mappings(), NIL, pips_debug, print_inout_regions(), reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), reset_proper_rw_effects(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_proper_rw_effects(), strdup(), unite_lists_containing_same_exact_region(), and unite_lists_with_same_head().
adds reg as final element on the end of reg_list unless reg is already present in reg_list i.e.
is same_reg_ignore_action as an element of reg_list
Definition at line 160 of file alias_classes.c.
References CONS, EFFECT, gen_nconc(), member(), NIL, and pips_debug.
Referenced by union_lists().
global variables IN: l_alias_lists global variables modified: l_alias_lists compares "head" (the head of the current list) to the head of each list of "rest_lists" (the other lists not yet treated) if a match is found, "other_list" (the other list containing the matching head "other_head") is appended to "new_list" and "other_list" will no longer be a member of "l_alias_lists" if not, "other_list" is appended to "l_alias_lists"
here, we don't need to account of the actions of the two regions: if a sub-program has the same IN and OUT regions for one array, then we will have created two alias lists which are identical except for the actions of the regions: now we get rid of one
Definition at line 403 of file alias_classes.c.
References ACTION_IN, ACTION_OUT, CAR, CDR, CONS, EFFECT, ifdebug, l_alias_lists, LIST, MAP, NIL, pips_debug, print_region, region, reset_action_interpretation(), rest_lists, same_reg_ignore_action(), set_action_interpretation(), and union_lists().
Referenced by unite_lists_with_same_head().
global variables IN: rest_list, l_lists global variables modified: rest_list, l_lists
here, it doesn't matter whether the regions have the same action
Definition at line 218 of file alias_classes.c.
References ACTION_IN, ACTION_OUT, CAR, CDR, CONS, EFFECT, effect_exact_p, ifdebug, l_lists, LIST, NIL, pips_debug, print_inout_regions(), print_region, region, reset_action_interpretation(), rest_list, same_reg_ignore_action(), set_action_interpretation(), and union_lists().
Referenced by compare_rest_lists().
|
static |
global variables IN: rest_list, rest_lists, l_lists global variables modified: rest_list, l_lists, rest_lists compares "elem" (the current element from the list currently being made into a class) to each element of each list of "rest_lists" (the other lists not yet made into classes) if a match is found, "other_list" (the other list containing the matching element "other_elem") is appended to "rest_list" (the not yet treated elements from the list currently being made into a class) and "other_list" will no longer be a member of "l_lists" if not, "other_list" is appended to "l_lists"
Definition at line 284 of file alias_classes.c.
References ACTION_IN, ACTION_OUT, CAR, CDR, compare_other_list(), ifdebug, LIST, NIL, pips_debug, print_region, reset_action_interpretation(), rest_lists, and set_action_interpretation().
Referenced by make_class_from_list().
|
static |
global variables IN: new_class, rest_lists, l_lists global variables modified: new_class, l_lists, rest_lists, rest_list
Definition at line 310 of file alias_classes.c.
References ACTION_IN, ACTION_OUT, CAR, CDR, compare_rest_lists(), CONS, EFFECT, effect_exact_p, gen_nconc(), ifdebug, l_lists, new_class, NIL, pips_debug, print_inout_regions(), print_region, region, reset_action_interpretation(), rest_list, rest_lists, and set_action_interpretation().
Referenced by unite_lists_containing_same_exact_region().
tests if reg and any member of reg_list are same_reg_ignore_action
Definition at line 113 of file alias_classes.c.
References CAR, CDR, EFFECT, NIL, pips_debug, region, rest_list, and same_reg_ignore_action().
Referenced by append_reg_if_not_present(), and tile_membership().
tests if reg1 and reg2 are the same, ignoring their action_tags (IN/OUT) but checking their precision (may/exact)
pips_debug(1,"same entity\n");
pips_debug(1,"same approx\n");
Definition at line 63 of file alias_classes.c.
References ACTION_IN, ACTION_OUT, effect_approximation_tag, effect_entity(), effect_undefined_p, ifdebug, pips_debug, print_region, region_system, reset_action_interpretation(), sc_equal_p_ofl, and set_action_interpretation().
Referenced by compare_heads_rest_lists(), compare_other_list(), and member().
add a copy of each element in additional_list not already present in initial_reg_list to the end of initial_reg_list (ignoring the action)
Definition at line 196 of file alias_classes.c.
References append_reg_if_not_present(), EFFECT, MAP, and pips_debug.
Referenced by compare_heads_rest_lists(), and compare_other_list().
|
static |
global variables IN: l_lists, l_alias_classes global variables modified:class, l_lists, rest_lists, rest_list, l_alias_classes
ifdebug(9) { pips_debug(9,"new_class:\n"); print_inout_regions(new_class);
pips_debug(9,"l_lists:\n"); MAP(LIST,alias_list, { print_inout_regions(alias_list);
pips_debug(9,"---\n"); }, l_lists); }
if (l_lists != NIL) unite_lists_containing_same_exact_region();
Definition at line 355 of file alias_classes.c.
References CAR, CDR, CONS, EFFECTS, l_alias_classes, l_lists, LIST, make_class_from_list(), make_effects(), new_class, NIL, pips_debug, and regions_dup().
Referenced by alias_classes().
|
static |
global variables IN: l_alias_lists, l_lists global variables modified: l_alias_lists, l_lists
ifdebug(9) { pips_debug(9,"new_list:\n"); print_inout_regions(new_list);
pips_debug(9,"l_alias_lists:\n"); MAP(LIST,alias_list, { print_inout_regions(alias_list);
pips_debug(9,"---\n"); }, l_alias_lists); }
Definition at line 463 of file alias_classes.c.
References ACTION_IN, ACTION_OUT, CAR, CDR, compare_heads_rest_lists(), CONS, EFFECT, ifdebug, l_alias_lists, l_lists, LIST, NIL, pips_debug, print_region, region, reset_action_interpretation(), and set_action_interpretation().
Referenced by alias_classes().
|
static |
Definition at line 54 of file alias_classes.c.
Referenced by alias_classes(), and unite_lists_containing_same_exact_region().
|
static |
Definition at line 54 of file alias_classes.c.
Referenced by alias_classes(), compare_heads_rest_lists(), and unite_lists_with_same_head().
|
static |
Definition at line 55 of file alias_classes.c.
Referenced by alias_classes(), compare_other_list(), make_class_from_list(), unite_lists_containing_same_exact_region(), and unite_lists_with_same_head().
|
static |
Definition at line 55 of file alias_classes.c.
Referenced by make_class_from_list(), and unite_lists_containing_same_exact_region().
|
static |
Definition at line 55 of file alias_classes.c.
Referenced by compare_other_list(), make_class_from_list(), and member().
|
static |
Definition at line 55 of file alias_classes.c.
Referenced by compare_heads_rest_lists(), compare_rest_lists(), and make_class_from_list().