aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2003-09-12 15:07:50 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2003-09-12 15:07:50 +0000
commitd2399d75150d38f714a7e55f44ac1b117896991e (patch)
treeb74dbfb654b2ba729bd9d180dd9845f8532b8c0e /gcc/flow.c
parentf0f4da3220c5b0c14d0e88ec57ff1bc5c5e0f367 (diff)
downloadgcc-d2399d75150d38f714a7e55f44ac1b117896991e.zip
gcc-d2399d75150d38f714a7e55f44ac1b117896991e.tar.gz
gcc-d2399d75150d38f714a7e55f44ac1b117896991e.tar.bz2
re PR rtl-optimization/8967 (Making class data members `const' pessimizes code)
PR optimization/8967 * alias.c (write_dependence_p): Modify to take an additional constp argument that controls whether the UNCHANGING_RTX_P flags are used. (anti_dependence, output_dependence): Adjust write_dependence_p callers to pass this additional argument, to return the same result. (unchanging_anti_dependence): New variant of anti_dependence that ignores the UNCHANGING_RTX_P property on memory references. * rtl.h (unchaning_anti_dependence): Prototype here. * flow.c (init_propagate_block): Place fake constant mem writes on the mem_set_list so that dead writes to const variables are deleted. (insn_dead_p): Change anti_dependence to unchanging_anti_dependence. (mark_used_regs): Likewise. From-SVN: r71332
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index 4bc33e2..66c04ee 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -1974,13 +1974,6 @@ init_propagate_block_info (basic_block bb, regset live, regset local_set,
rtx mem = SET_DEST (set);
rtx canon_mem = canon_rtx (mem);
- /* This optimization is performed by faking a store to the
- memory at the end of the block. This doesn't work for
- unchanging memories because multiple stores to unchanging
- memory is illegal and alias analysis doesn't consider it. */
- if (RTX_UNCHANGING_P (canon_mem))
- continue;
-
if (XEXP (canon_mem, 0) == frame_pointer_rtx
|| (GET_CODE (XEXP (canon_mem, 0)) == PLUS
&& XEXP (XEXP (canon_mem, 0), 0) == frame_pointer_rtx
@@ -2152,7 +2145,7 @@ insn_dead_p (struct propagate_block_info *pbi, rtx x, int call_ok,
rtx_equal_p does not check the alias set or flags, we also
must have the potential for them to conflict (anti_dependence). */
for (temp = pbi->mem_set_list; temp != 0; temp = XEXP (temp, 1))
- if (anti_dependence (r, XEXP (temp, 0)))
+ if (unchanging_anti_dependence (r, XEXP (temp, 0)))
{
rtx mem = XEXP (temp, 0);
@@ -3730,7 +3723,7 @@ mark_used_regs (struct propagate_block_info *pbi, rtx x, rtx cond, rtx insn)
while (temp)
{
next = XEXP (temp, 1);
- if (anti_dependence (XEXP (temp, 0), x))
+ if (unchanging_anti_dependence (XEXP (temp, 0), x))
{
/* Splice temp out of the list. */
if (prev)