This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[vta, trunk?] handle ARRAY_RANGE_REFs like ARRAY_REFs in TMR
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 29 Oct 2008 17:36:09 -0200
- Subject: [vta, trunk?] handle ARRAY_RANGE_REFs like ARRAY_REFs in TMR
This bug was uncovered by a TARGET_MEM_REF in a debug insn, IIRC, that
didn't get the array bounds SSA-updated during certain
transformations. The SSA_NAME lived all the way through to
out-of-ssa, causing great grief (as in, IIRC, -fcompare-debug failures
:-)
This patch fixes it. I'm installing it in the branch. I think it
would probably be appropriate for the trunk as well. Ok to install?
for gcc/ChangeLog.vta
from Alexandre Oliva <aoliva@redhat.com>
* tree-ssa-loop-ivopts.c (idx_remove_ssa_names): Handle
ARRAY_RANGE_REFs like ARRAY_REFs.
Index: gcc/tree-ssa-loop-ivopts.c
===================================================================
--- gcc/tree-ssa-loop-ivopts.c.orig 2008-10-10 09:31:05.000000000 -0300
+++ gcc/tree-ssa-loop-ivopts.c 2008-10-14 18:06:10.000000000 -0300
@@ -5181,7 +5181,7 @@ idx_remove_ssa_names (tree base, tree *i
if (TREE_CODE (*idx) == SSA_NAME)
*idx = SSA_NAME_VAR (*idx);
- if (TREE_CODE (base) == ARRAY_REF)
+ if (TREE_CODE (base) == ARRAY_REF || TREE_CODE (base) == ARRAY_RANGE_REF)
{
op = &TREE_OPERAND (base, 2);
if (*op
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}
FSFLA Board Member ÂSÃ Libre! => http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}