summaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-21 18:55:18 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-21 18:55:18 +0000
commit86e87ef6099fefa07d967a33b48ba2aefd18ab97 (patch)
treeb0d6f2ebda9f50cb79a963c6fdd93ec04cda0025 /gcc/alias.c
parent87e440281cb26fcad5bc61a9e3794d34d6e76dc1 (diff)
downloadgcc-86e87ef6099fefa07d967a33b48ba2aefd18ab97.tar.gz
gcc/
PR bootstrap/53021 * rtl.def (ADDRESS): Use "i" rather than "w". * rtl.h (find_base_term): Delete. (may_be_sp_based_p): Declare. * rtl.c (rtx_code_size): Remove ADDRESS special case. * alias.h (UNIQUE_BASE_VALUE_SP, UNIQUE_BASE_VALUE_ARGP) (UNIQUE_BASE_VALUE_FP, UNIQUE_BASE_VALUE_HFP): Move to... * alias.c: ...here. (find_base_term): Make static. (may_be_sp_based_p): New function. * dse.c (record_store): Use it. * store-motion.c (store_killed_in_insn): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186657 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 7b1986c0923..8366f9c3a5e 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -228,6 +228,13 @@ static int unique_id;
array. */
static GTY((deletable)) VEC(rtx,gc) *old_reg_base_value;
+/* Values of XINT (address, 0) of Pmode ADDRESS rtxes for special
+ registers. */
+#define UNIQUE_BASE_VALUE_SP -1
+#define UNIQUE_BASE_VALUE_ARGP -2
+#define UNIQUE_BASE_VALUE_FP -3
+#define UNIQUE_BASE_VALUE_HFP -4
+
#define static_reg_base_value \
(this_target_rtl->x_static_reg_base_value)
@@ -1584,7 +1591,7 @@ rtx_equal_for_memref_p (const_rtx x, const_rtx y)
return 1;
}
-rtx
+static rtx
find_base_term (rtx x)
{
cselib_val *val;
@@ -1740,6 +1747,16 @@ find_base_term (rtx x)
}
}
+/* Return true if accesses to address X may alias accesses based
+ on the stack pointer. */
+
+bool
+may_be_sp_based_p (rtx x)
+{
+ rtx base = find_base_term (x);
+ return !base || base == static_reg_base_value[STACK_POINTER_REGNUM];
+}
+
/* Return 0 if the addresses X and Y are known to point to different
objects, 1 if they might be pointers to the same object. */