aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>2004-03-21 00:08:57 +0100
committerZdenek Dvorak <rakdver@gcc.gnu.org>2004-03-20 23:08:57 +0000
commitf8ad8d7cf8e3c4caf7317900fda3b92f0f7f23b9 (patch)
tree433e408c11da99bc70ed380b6638087bd38c1d32
parent687c3ea538f70e6a198a11a3999a23b318759e27 (diff)
downloadgcc-f8ad8d7cf8e3c4caf7317900fda3b92f0f7f23b9.zip
gcc-f8ad8d7cf8e3c4caf7317900fda3b92f0f7f23b9.tar.gz
gcc-f8ad8d7cf8e3c4caf7317900fda3b92f0f7f23b9.tar.bz2
emit-rtl.c (set_mem_attributes_minus_bitpos): Set MEM_POINTER flag.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Set MEM_POINTER flag. * explow.c (force_not_mem): Set REG_POINTER flag according to MEM_POINTER one. * rtl.h (MEM_POINTER): New macro. (struct rtx_def): Use integrated for MEM_SCALAR_P and frame_related for MEM_POINTER. From-SVN: r79764
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/emit-rtl.c1
-rw-r--r--gcc/explow.c4
-rw-r--r--gcc/rtl.h14
4 files changed, 24 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7f32ea6..46a3a9e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2004-03-20 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
+
+ * emit-rtl.c (set_mem_attributes_minus_bitpos): Set MEM_POINTER
+ flag.
+ * explow.c (force_not_mem): Set REG_POINTER flag according to
+ MEM_POINTER one.
+ * rtl.h (MEM_POINTER): New macro.
+ (struct rtx_def): Use integrated for MEM_SCALAR_P and frame_related
+ for MEM_POINTER.
+
2004-03-20 Roger Sayle <roger@eyesopen.com>
PR target/13889
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 3032b53..6d18b78 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1512,6 +1512,7 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
|= ((lang_hooks.honor_readonly
&& (TYPE_READONLY (type) || TREE_READONLY (t)))
|| (! TYPE_P (t) && TREE_CONSTANT (t)));
+ MEM_POINTER (ref) = POINTER_TYPE_P (type);
/* If we are making an object of this type, or if this is a DECL, we know
that it is a scalar if the type is not an aggregate. */
diff --git a/gcc/explow.c b/gcc/explow.c
index 0655f24..b3c82b8 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -770,6 +770,10 @@ force_not_mem (rtx x)
return x;
temp = gen_reg_rtx (GET_MODE (x));
+
+ if (MEM_POINTER (x))
+ REG_POINTER (temp) = 1;
+
emit_move_insn (temp, x);
return temp;
}
diff --git a/gcc/rtl.h b/gcc/rtl.h
index e98203f..26466a9 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -243,14 +243,14 @@ struct rtx_def GTY((chain_next ("RTX_NEXT (&%h)"),
/* Nonzero if this rtx came from procedure integration.
1 in a REG or PARALLEL means this rtx refers to the return value
of the current function.
- 1 in a SYMBOL_REF if the symbol is weak. */
+ 1 in a SYMBOL_REF if the symbol is weak.
+ 1 in a MEM if the MEM refers to a scalar, rather than a member of
+ an aggregate. */
unsigned integrated : 1;
/* 1 in an INSN or a SET if this rtx is related to the call frame,
either changing how we compute the frame address or saving and
restoring registers in the prologue and epilogue.
- 1 in a MEM if the MEM refers to a scalar, rather than a member of
- an aggregate.
- 1 in a REG if the register is a pointer.
+ 1 in a REG or MEM if it is a pointer.
1 in a SYMBOL_REF if it addresses something in the per-function
constant string pool. */
unsigned frame_related : 1;
@@ -1136,6 +1136,10 @@ enum label_kind
#define REG_POINTER(RTX) \
(RTL_FLAG_CHECK1("REG_POINTER", (RTX), REG)->frame_related)
+/* 1 if RTX is a mem that holds a pointer value. */
+#define MEM_POINTER(RTX) \
+ (RTL_FLAG_CHECK1("MEM_POINTER", (RTX), MEM)->frame_related)
+
/* 1 if the given register REG corresponds to a hard register. */
#define HARD_REGISTER_P(REG) (HARD_REGISTER_NUM_P (REGNO (REG)))
@@ -1251,7 +1255,7 @@ do { \
/* 1 if RTX is a mem that refers to a scalar. If zero, RTX may or may
not refer to a scalar. */
#define MEM_SCALAR_P(RTX) \
- (RTL_FLAG_CHECK1("MEM_SCALAR_P", (RTX), MEM)->frame_related)
+ (RTL_FLAG_CHECK1("MEM_SCALAR_P", (RTX), MEM)->integrated)
/* 1 if RTX is a mem that cannot trap. */
#define MEM_NOTRAP_P(RTX) \