This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[autovect][patch]Remove unnecessary call to mark_call_clobbered_vars_to_rename
- From: Keith Besaw <kbesaw at us dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Dorit Naishlos <DORIT at il dot ibm dot com>, dnovillo at redhat dot com
- Date: Wed, 2 Feb 2005 00:06:44 -0600
- Subject: [autovect][patch]Remove unnecessary call to mark_call_clobbered_vars_to_rename
Remove the call to mark_call_clobbered_vars_to_rename generated for the
CALL_EXPR to the builtin targetm.vectorize.builtin_mask_for_load.
Currently
the only definition of builtin targetm.vectorize.builtin_mask_for_load is
from
config/rs6000.c where the builtin is declared "const". It is expected
that the
builtin would be "const" for any other architectures that declared it in
the future.
A gcc_assert has been inserted to ensure this.
This change is one more step in removing any need for tree-vectorizer.c to
call rewrite_into_ssa to do variable renaming.
Keith
Index: tree-vectorizer.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/tree-vectorizer.c,v
retrieving revision 2.25.2.11
diff -c -3 -p -r2.25.2.11 tree-vectorizer.c
*** tree-vectorizer.c 30 Jan 2005 18:11:03 -0000 2.25.2.11
--- tree-vectorizer.c 2 Feb 2005 05:30:59 -0000
*************** vectorizable_load (tree stmt, block_stmt
*** 3012,3020 ****
gcc_assert (!new_bb);
magic = TREE_OPERAND (new_stmt, 0);
! /* Since we have just created a CALL_EXPR, we may need to
! rename call-clobbered variables. */
! mark_call_clobbered_vars_to_rename ();
}
else
{
--- 3017,3029 ----
gcc_assert (!new_bb);
magic = TREE_OPERAND (new_stmt, 0);
! /* The result of the CALL_EXPR to this builtin is determined
from
! the value of the parameter and no global variables are
touched
! which makes the builtin a "const" function. Requiring the
! builtin to have the "const" attribute makes it unnecessary
! to call mark_call_clobbered_vars_to_rename. */
! gcc_assert (TREE_READONLY (builtin_decl));
!
}
else
{