aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c32
1 files changed, 6 insertions, 26 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index d003de92..c03ff03 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -46,6 +46,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "varray.h"
#include "tree-pass.h"
#include "ipa-type-escape.h"
+#include "df.h"
/* The aliasing API provided here solves related but different problems:
@@ -839,7 +840,7 @@ find_base_value (rtx src)
/* If we're inside init_alias_analysis, use new_reg_base_value
to reduce the number of relaxation iterations. */
if (new_reg_base_value && new_reg_base_value[regno]
- && REG_N_SETS (regno) == 1)
+ && DF_REG_DEF_COUNT (regno) == 1)
return new_reg_base_value[regno];
if (VEC_index (rtx, reg_base_value, regno))
@@ -1087,27 +1088,6 @@ record_set (rtx dest, rtx set, void *data ATTRIBUTE_UNUSED)
reg_seen[regno] = 1;
}
-/* Clear alias info for a register. This is used if an RTL transformation
- changes the value of a register. This is used in flow by AUTO_INC_DEC
- optimizations. We don't need to clear reg_base_value, since flow only
- changes the offset. */
-
-void
-clear_reg_alias_info (rtx reg)
-{
- unsigned int regno = REGNO (reg);
-
- if (regno >= FIRST_PSEUDO_REGISTER)
- {
- regno -= FIRST_PSEUDO_REGISTER;
- if (regno < reg_known_value_size)
- {
- reg_known_value[regno] = reg;
- reg_known_equiv_p[regno] = false;
- }
- }
-}
-
/* If a value is known for REGNO, return it. */
rtx
@@ -2433,7 +2413,7 @@ init_alias_analysis (void)
the optimization level or flag_expensive_optimizations.
We could propagate more information in the first pass by making use
- of REG_N_SETS to determine immediately that the alias information
+ of DF_REG_DEF_COUNT to determine immediately that the alias information
for a pseudo is "constant".
A program with an uninitialized variable can cause an infinite loop
@@ -2514,7 +2494,7 @@ init_alias_analysis (void)
note = find_reg_equal_equiv_note (insn);
if (note && REG_NOTE_KIND (note) == REG_EQUAL
- && REG_N_SETS (regno) != 1)
+ && DF_REG_DEF_COUNT (regno) != 1)
note = NULL_RTX;
if (note != NULL_RTX
@@ -2527,7 +2507,7 @@ init_alias_analysis (void)
set_reg_known_equiv_p (regno,
REG_NOTE_KIND (note) == REG_EQUIV);
}
- else if (REG_N_SETS (regno) == 1
+ else if (DF_REG_DEF_COUNT (regno) == 1
&& GET_CODE (src) == PLUS
&& REG_P (XEXP (src, 0))
&& (t = get_reg_known_value (REGNO (XEXP (src, 0))))
@@ -2537,7 +2517,7 @@ init_alias_analysis (void)
set_reg_known_value (regno, t);
set_reg_known_equiv_p (regno, 0);
}
- else if (REG_N_SETS (regno) == 1
+ else if (DF_REG_DEF_COUNT (regno) == 1
&& ! rtx_varies_p (src, 1))
{
set_reg_known_value (regno, src);