This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix 19865
- From: Diego Novillo <dnovillo at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 16 Feb 2005 14:17:34 -0500
- Subject: Fix 19865
- Organization: Red Hat Canada
In the end, the Right Thing to do here is to run may-alias after SRA.
The amount of gimplification done is non-trivial and it exposes new
symbols that may be call-clobbered. We needed to do this earlier for
fold_all_builtins.
In 4.1 we should make pass_may_alias a TODO item and, maybe, have
dynamic triggers for it so that we don't have to run it unnecessarily.
Bootstrapped and tested x86, x86-64, ia64 and ppc (ppc is the only host
where I can build Ada).
I will need someone who knows their way around the Ada testsuite to add
the test case from the PR. I found no documentation in testsuite/ada to
give me a hint where to put the test and how to make it run.
Diego.
2005-02-16 Diego Novillo <dnovillo@redhat.com>
PR tree-optimization/19865
* tree-optimize.c (init_tree_optimization_passes): Run
pass_may_alias after pass_sra.
Index: tree-optimize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-optimize.c,v
retrieving revision 2.71
diff -d -u -p -r2.71 tree-optimize.c
--- tree-optimize.c 14 Feb 2005 21:32:14 -0000 2.71
+++ tree-optimize.c 16 Feb 2005 16:04:36 -0000
@@ -364,6 +364,10 @@ init_tree_optimization_passes (void)
NEXT_PASS (pass_ch);
NEXT_PASS (pass_profile);
NEXT_PASS (pass_sra);
+ /* FIXME: SRA may generate arbitrary gimple code, exposing new
+ aliased and call-clobbered variables. As mentioned below,
+ pass_may_alias should be a TODO item. */
+ NEXT_PASS (pass_may_alias);
NEXT_PASS (pass_rename_ssa_copies);
NEXT_PASS (pass_dominator);
NEXT_PASS (pass_redundant_phi);