OSDN Git Service

2008-01-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Jan 2008 13:27:52 +0000 (13:27 +0000)
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Jan 2008 13:27:52 +0000 (13:27 +0000)
PR middle-end/33092
* tree-pass.h (pass_build_alias): New pass.
* tree-ssa-alias.c (gate_build_alias): New.
(pass_build_alias): New.
* passes.c (init_optimization_passes): Add pass_build_alias after
pass_create_structure_vars.

testsuite/
* gcc.dg/pr33092.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131717 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/passes.c
gcc/testsuite/ChangeLog
gcc/tree-pass.h
gcc/tree-ssa-alias.c

index fe329df..1da929c 100644 (file)
@@ -1,3 +1,12 @@
+2008-01-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+       PR middle-end/33092
+       * tree-pass.h (pass_build_alias): New pass.
+       * tree-ssa-alias.c (gate_build_alias): New.
+       (pass_build_alias): New.
+       * passes.c (init_optimization_passes): Add pass_build_alias after
+       pass_create_structure_vars.
+
 2008-01-22  Wolfgang Gellerich  <gellerich@de.ibm.com>
 
        * config/s390/s390.h (S390_TDC_POSITIVE_NORMALIZED_NUMBER):
index 48f78b4..2614c90 100644 (file)
@@ -557,6 +557,10 @@ init_optimization_passes (void)
     {
       struct tree_opt_pass **p = &pass_all_optimizations.sub;
       NEXT_PASS (pass_create_structure_vars);
+      /* ??? pass_build_alias is a dummy pass that ensures that we
+        execute TODO_rebuild_alias at this point even if
+        pass_create_structure_vars was disabled.  */
+      NEXT_PASS (pass_build_alias);
       NEXT_PASS (pass_return_slot);
       NEXT_PASS (pass_rename_ssa_copies);
 
index e73eae9..1c9c54c 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+       PR middle-end/33092
+       * gcc.dg/pr33092.c: New.
+
 2008-01-22  Andreas Krebbel  <krebbel1@de.ibm.com>
 
        * gcc.target/s390/20020926-1.c: Add -m31 option.
index 3eda29e..fe73332 100644 (file)
@@ -278,6 +278,7 @@ extern struct tree_opt_pass pass_ccp;
 extern struct tree_opt_pass pass_phi_only_cprop;
 extern struct tree_opt_pass pass_build_ssa;
 extern struct tree_opt_pass pass_del_ssa;
+extern struct tree_opt_pass pass_build_alias;
 extern struct tree_opt_pass pass_dominator;
 extern struct tree_opt_pass pass_dce;
 extern struct tree_opt_pass pass_dce_loop;
index 13ec95b..7ab2f6b 100644 (file)
@@ -4252,3 +4252,27 @@ struct tree_opt_pass pass_reset_cc_flags =
   0,                    /* todo_flags_finish */
   0                     /* letter */
 };
+
+static bool
+gate_build_alias (void)
+{
+  return !gate_structure_vars();
+}
+
+
+struct tree_opt_pass pass_build_alias =
+{
+  "build_alias",            /* name */
+  gate_build_alias,         /* gate */
+  NULL,                     /* execute */
+  NULL,                     /* sub */
+  NULL,                     /* next */
+  0,                        /* static_pass_number */
+  0,                        /* tv_id */
+  PROP_cfg | PROP_ssa,      /* properties_required */
+  PROP_alias,               /* properties_provided */
+  0,                        /* properties_destroyed */
+  0,                        /* todo_flags_start */
+  TODO_rebuild_alias,        /* todo_flags_finish */
+  0                         /* letter */
+};