This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[lno] [PATCH] Fix check to execute ddg pass and reset varrays


This patch fixes gate_ddg() to check existence of loops. If loops does not exist in current function do not execute ddg pass. It also resets varrays in dg_delete_graph ().

2004-02-27 Devang Patel <dpatel@apple.com

        * tree-dg.c (dg_delete_graph): Reset varrays.
        (gate_ddg) : Check current loops.
--
Devang

Index: tree-dg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-dg.c,v
retrieving revision 1.1.2.3
diff -Idpatel.pbxuser -c -3 -p -r1.1.2.3 tree-dg.c
*** tree-dg.c   21 Feb 2004 01:09:47 -0000      1.1.2.3
--- tree-dg.c   27 Feb 2004 20:17:49 -0000
*************** dg_delete_graph (void)
*** 169,174 ****
--- 169,178 ----

        /* Clear dependence graph itself.  */
        VARRAY_CLEAR (dependence_graph);
+
+       datarefs = NULL;
+       dependence_relations = NULL;
+       dependence_graph = NULL;
      }

  }
*************** ddg_distance_between_stmts (tree stmt1,
*** 515,521 ****
  static bool
  gate_ddg (void)
  {
!   return flag_ddg && flag_scalar_evolutions != 0;
  }

  struct tree_opt_pass pass_ddg =
--- 519,528 ----
  static bool
  gate_ddg (void)
  {
!   struct loops *current_loops;
!
!   current_loops = loop_optimizer_init (NULL);
!   return current_loops && flag_ddg && flag_scalar_evolutions != 0;
  }

struct tree_opt_pass pass_ddg =


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]