mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-22 22:19:53 +08:00
var-tracking.c (variable_different_p): Add a parameter compare_current_location...
* var-tracking.c (variable_different_p): Add a parameter compare_current_location, compare current location of variable parts if it is true. (dataflow_set_different_1): Pass compare_current_location == false. (dataflow_set_different_2): Pass compare_current_location == false. (emit_notes_for_differences_1): Pass compare_current_location == true. From-SVN: r81242
This commit is contained in:
parent
cfa2949646
commit
83532fb78e
@ -1,3 +1,12 @@
|
|||||||
|
2004-04-28 Josef Zlomek <zlomekj@suse.cz>
|
||||||
|
|
||||||
|
* var-tracking.c (variable_different_p): Add a parameter
|
||||||
|
compare_current_location, compare current location of variable parts
|
||||||
|
if it is true.
|
||||||
|
(dataflow_set_different_1): Pass compare_current_location == false.
|
||||||
|
(dataflow_set_different_2): Pass compare_current_location == false.
|
||||||
|
(emit_notes_for_differences_1): Pass compare_current_location == true.
|
||||||
|
|
||||||
2004-04-28 Ulrich Weigand <uweigand@de.ibm.com>
|
2004-04-28 Ulrich Weigand <uweigand@de.ibm.com>
|
||||||
|
|
||||||
* config/s390/s390.md ("casesi"): Mark jump table access as
|
* config/s390/s390.md ("casesi"): Mark jump table access as
|
||||||
|
@ -304,7 +304,7 @@ static int variable_union_info_cmp_pos (const void *, const void *);
|
|||||||
static int variable_union (void **, void *);
|
static int variable_union (void **, void *);
|
||||||
static void dataflow_set_union (dataflow_set *, dataflow_set *);
|
static void dataflow_set_union (dataflow_set *, dataflow_set *);
|
||||||
static bool variable_part_different_p (variable_part *, variable_part *);
|
static bool variable_part_different_p (variable_part *, variable_part *);
|
||||||
static bool variable_different_p (variable, variable);
|
static bool variable_different_p (variable, variable, bool);
|
||||||
static int dataflow_set_different_1 (void **, void *);
|
static int dataflow_set_different_1 (void **, void *);
|
||||||
static int dataflow_set_different_2 (void **, void *);
|
static int dataflow_set_different_2 (void **, void *);
|
||||||
static bool dataflow_set_different (dataflow_set *, dataflow_set *);
|
static bool dataflow_set_different (dataflow_set *, dataflow_set *);
|
||||||
@ -1260,12 +1260,13 @@ variable_part_different_p (variable_part *vp1, variable_part *vp2)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return true if variables VAR1 and VAR2 are different (only the first
|
/* Return true if variables VAR1 and VAR2 are different.
|
||||||
location in the list of locations is checked for each offset,
|
If COMPARE_CURRENT_LOCATION is true compare also the cur_loc of each
|
||||||
i.e. when true is returned a note should be emitted). */
|
variable part. */
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
variable_different_p (variable var1, variable var2)
|
variable_different_p (variable var1, variable var2,
|
||||||
|
bool compare_current_location)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -1279,6 +1280,16 @@ variable_different_p (variable var1, variable var2)
|
|||||||
{
|
{
|
||||||
if (var1->var_part[i].offset != var2->var_part[i].offset)
|
if (var1->var_part[i].offset != var2->var_part[i].offset)
|
||||||
return true;
|
return true;
|
||||||
|
if (compare_current_location)
|
||||||
|
{
|
||||||
|
if (!((GET_CODE (var1->var_part[i].cur_loc) == REG
|
||||||
|
&& GET_CODE (var2->var_part[i].cur_loc) == REG
|
||||||
|
&& (REGNO (var1->var_part[i].cur_loc)
|
||||||
|
== REGNO (var2->var_part[i].cur_loc)))
|
||||||
|
|| rtx_equal_p (var1->var_part[i].cur_loc,
|
||||||
|
var2->var_part[i].cur_loc)))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (variable_part_different_p (&var1->var_part[i], &var2->var_part[i]))
|
if (variable_part_different_p (&var1->var_part[i], &var2->var_part[i]))
|
||||||
return true;
|
return true;
|
||||||
if (variable_part_different_p (&var2->var_part[i], &var1->var_part[i]))
|
if (variable_part_different_p (&var2->var_part[i], &var1->var_part[i]))
|
||||||
@ -1307,7 +1318,7 @@ dataflow_set_different_1 (void **slot, void *data)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (variable_different_p (var1, var2))
|
if (variable_different_p (var1, var2, false))
|
||||||
{
|
{
|
||||||
dataflow_set_different_value = true;
|
dataflow_set_different_value = true;
|
||||||
|
|
||||||
@ -1342,7 +1353,7 @@ dataflow_set_different_2 (void **slot, void *data)
|
|||||||
#ifdef ENABLE_CHECKING
|
#ifdef ENABLE_CHECKING
|
||||||
/* If both variables are defined they have been already checked for
|
/* If both variables are defined they have been already checked for
|
||||||
equivalence. */
|
equivalence. */
|
||||||
if (variable_different_p (var1, var2))
|
if (variable_different_p (var1, var2, false))
|
||||||
abort ();
|
abort ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2286,7 +2297,7 @@ emit_notes_for_differences_1 (void **slot, void *data)
|
|||||||
empty_var->n_var_parts = 0;
|
empty_var->n_var_parts = 0;
|
||||||
variable_was_changed (empty_var, NULL);
|
variable_was_changed (empty_var, NULL);
|
||||||
}
|
}
|
||||||
else if (variable_different_p (old_var, new_var))
|
else if (variable_different_p (old_var, new_var, true))
|
||||||
{
|
{
|
||||||
variable_was_changed (new_var, NULL);
|
variable_was_changed (new_var, NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user