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]

[alias-export] Other cleanups


Hello,

I have committed more cleanup patches to alias-export branch today. I send them all in this message so that I do not spam the list. The patches were as follows:

r147226: revert changes to alias.c memrefs_alias_p code, remove some unneeded stuff, and fix the unrelated changes on the branch that I got due to using old style svn merge;

r147232: Makefile.in dependency changes, removing statistics for useful queries, properly hashing mem-attrs with orig-exprs, properly refusing to disambiguate via ddrs after pipelining, removing more unneeded stuff;

r147233: removing passes that were just freeing export data structures, now we're doing this in pass_clean_state instead. Should we have a pass for freeing various on-the-side stuff? I see that df has its own pass, I did not want to add any more.

r147240: using Richi's statistics infrastructure instead of own counters. I wanted to emit information only to global statistics file while freeing info, that is, from pass_clean_state, but this didn't work because this pass has static_pass_number == -1, and this makes curr_statistics_hash abort because the idx variable it uses is unsigned. Fixed by allowing this from statistics_counter_event and adding an assert that this wouldn't happen again. I can submit this piece separately for trunk.

I believe that after all these fixes the patch is ready to be submitted (at least as an RFC). I will probably do that tomorrow.

Andrey

2009-05-07 Andrey Belevantsev <abel@ispras.ru>

* dbgcnt.def (alias_export): Move to proper place.
(ddg_export): New.
* ddg.c: Do not include alias-export.h.
* alias.c (memrefs_conflict_p): Do not return 2 for must-alias
cases.
(true_dependence, write_dependence_p, canon_true_dependence): Do not
call query_alias_export_info for the first time.
* alias-export.c (gate_report_aliases): Do not check for
flag_alias_export_check.
* emit-rtl.c (mem_attrs_htab_eq): Process orig_expr similarly to expr.
* common.opt (flag_alias_export_check): Remove.
* gimple.h (find_pos_in_stmt): Remove declaration.
* ipa-struct-reorg.c (find_pos_in_stmt): Do not export.


2009-05-07 Andrey Belevantsev <abel@ispras.ru>

* tree.c (iterative_hash_gimple): Remove.
* tree.h: Remove its definition.
* modulo-sched.c: Include alias-export.h.
(rest_of_handle_sms): Call ddg_export_set_pipelining_completed.
* sel-sched.c: Likewise.
* alias.c (query_alias_export_info): Remove third argument. Simplify.
Update all callers.
(walk_mems_2): Pass true to ddg_export_may_alias_p.
* alias-export.c: Tidy up include list.
(record_addressable_bases): Remove.
(last_dry_run): Likewise. Update all callers.
(alias_export_may_alias_p): Remove rtx arguments.
(alias_export_test): Remove.
(ddg_info): Rename disambiguate_only_intra_loop_deps to pipelining_completed.
Update all users.
(ddg_export_may_alias_p): Make third argument a bool. Remove statistics,
simplify.
* alias-export.h: Remove unneeded declarations.
* emit-rtl.c (mem_attrs_htab_hash): Properly hash using orig_exprs.
* Makefile.in: Update dependencies for files including alias-export.h.



2009-05-07 Andrey Belevantsev <abel@ispras.ru>


* alias-export.h (free_alias_export_info, free_ddg_export_info): Declare.
* final.c (rest_of_clean_state): Call free_alias_export_info and
free_ddg_export_info from here.
* tree-pass.h (pass_free_alias_export, pass_free_ddg_info): Remove.
* alias-export.c: Likewise.
(handle_free_aliases, free_ddg_info): Make extern and rename.
(struct ddg_info_def): Document fields.
* Makefile.in (final.o): Add alias-export.h.
* passes.c (init_optimization_passes): Remove passes for freeing
exported info.



2009-05-07 Andrey Belevantsev <abel@ispras.ru>


* toplev.c (finalize): Remove call to alias_export_finish_once.
* alias-export.c: Include statistics.h.
(export_refs_may_alias_p): Inline into ...
(alias_export_may_alias_p): ... here.
Kill statistics counters.
(free_alias_export_info): Record statistics counter.
(free_ddg_export_info): Likewise.
(alias_export_disambiguations, ddg_export_disambiguations): New counters.
(alias_export_finish_once): Remove.
(bases_got_addressable): Remove.
(handle_report_aliases): Remove.
(ddg_export_may_alias_p): Use debug counter.
* Makefile.in (alias-export.o): Add statistics.h.
* statistics.c (statistics_counter_event): Do not record event in pass
dump if its number == -1.
(curr_statistics_hash): Add assert that we never get passes with static
number == -1.
Index: gcc/dbgcnt.def
===================================================================
*** gcc/dbgcnt.def	(revision 147225)
--- gcc/dbgcnt.def	(revision 147226)
*************** echo ubound: $ub
*** 141,146 ****
--- 141,147 ----
  */
  
  /* Debug counter definitions.  */
+ DEBUG_COUNTER (alias_export)
  DEBUG_COUNTER (auto_inc_dec)
  DEBUG_COUNTER (ccp)
  DEBUG_COUNTER (cfg_cleanup)
*************** DEBUG_COUNTER (cprop)
*** 149,154 ****
--- 150,156 ----
  DEBUG_COUNTER (dce)
  DEBUG_COUNTER (dce_fast)
  DEBUG_COUNTER (dce_ud)
+ DEBUG_COUNTER (ddg_export)
  DEBUG_COUNTER (delete_trivial_dead)
  DEBUG_COUNTER (df_byte_scan)
  DEBUG_COUNTER (dse)
*************** DEBUG_COUNTER (sms_sched_loop)
*** 179,182 ****
  DEBUG_COUNTER (store_motion)
  DEBUG_COUNTER (split_for_sched2)
  DEBUG_COUNTER (tail_call)
- DEBUG_COUNTER (alias_export)
--- 181,183 ----
Index: gcc/ddg.c
===================================================================
*** gcc/ddg.c	(revision 147225)
--- gcc/ddg.c	(revision 147226)
*************** along with GCC; see the file COPYING3.  
*** 42,48 ****
  #include "sbitmap.h"
  #include "expr.h"
  #include "bitmap.h"
- #include "alias-export.h"
  #include "ddg.h"
  
  #ifdef INSN_SCHEDULING
--- 42,47 ----
Index: gcc/alias-export.c
===================================================================
*** gcc/alias-export.c	(revision 147225)
--- gcc/alias-export.c	(revision 147226)
*************** gate_report_aliases (void)
*** 421,427 ****
  {
    return ((flag_alias_export == 1
             || flag_ddg_export == 1)
!           && flag_alias_export_check);
  }
  
  void alias_export_finish_once (void)
--- 421,427 ----
  {
    return ((flag_alias_export == 1
             || flag_ddg_export == 1)
!           && false);
  }
  
  void alias_export_finish_once (void)
Index: gcc/emit-rtl.c
===================================================================
*** gcc/emit-rtl.c	(revision 147225)
--- gcc/emit-rtl.c	(revision 147226)
*************** mem_attrs_htab_eq (const void *x, const 
*** 317,327 ****
  	  && (p->expr == q->expr
  	      || (p->expr != NULL_TREE && q->expr != NULL_TREE
  		  && operand_equal_p (p->expr, q->expr, 0)))
!           /* We do not use operand_equal_p for ORIG_EXPRs because we need to
!              distinguish memory references at different points of the loop (which
!              would have different indices in SSA form, like a[i_1] and a[i_2], but
!              were later rewritten to same a[i]).  */
!           && (p->orig_expr == q->orig_expr));
  }
  
  /* Allocate a new mem_attrs structure and insert it into the hash table if
--- 317,325 ----
  	  && (p->expr == q->expr
  	      || (p->expr != NULL_TREE && q->expr != NULL_TREE
  		  && operand_equal_p (p->expr, q->expr, 0)))
!           && (p->orig_expr == q->orig_expr
!               || (p->orig_expr != NULL_TREE && q->orig_expr != NULL_TREE
!                   && operand_equal_p (p->orig_expr, q->orig_expr, 0))));
  }
  
  /* Allocate a new mem_attrs structure and insert it into the hash table if
*************** component_ref_for_mem_expr (tree ref)
*** 1453,1459 ****
        while (CONVERT_EXPR_P (inner)
  	     || TREE_CODE (inner) == VIEW_CONVERT_EXPR
  	     || TREE_CODE (inner) == SAVE_EXPR)
!        inner = TREE_OPERAND (inner, 0);
  
        if (! DECL_P (inner))
  	inner = NULL_TREE;
--- 1451,1457 ----
        while (CONVERT_EXPR_P (inner)
  	     || TREE_CODE (inner) == VIEW_CONVERT_EXPR
  	     || TREE_CODE (inner) == SAVE_EXPR)
! 	inner = TREE_OPERAND (inner, 0);
  
        if (! DECL_P (inner))
  	inner = NULL_TREE;
Index: gcc/common.opt
===================================================================
*** gcc/common.opt	(revision 147225)
--- gcc/common.opt	(revision 147226)
*************** falias-export
*** 494,503 ****
  Common Report Var(flag_alias_export) Optimization Init(1)
  Save alias information on Tree-SSA to be used on RTL
  
- falias-export-check
- Common Report Var(flag_alias_export_check) Optimization
- Regularly check integrity and consistency of saved alias information
- 
  fddg-export
  Common Report Var(flag_ddg_export) Optimization Init(1)
  Save alias information on Tree-SSA to be used on RTL
--- 494,499 ----
Index: gcc/gimple.h
===================================================================
*** gcc/gimple.h	(revision 147225)
--- gcc/gimple.h	(revision 147226)
*************** tree walk_gimple_stmt (gimple_stmt_itera
*** 4503,4510 ****
  		       struct walk_stmt_info *);
  tree walk_gimple_op (gimple, walk_tree_fn, struct walk_stmt_info *);
  
- extern tree * find_pos_in_stmt (gimple, tree);
- 
  #ifdef GATHER_STATISTICS
  /* Enum and arrays used for allocation stats.  Keep in sync with
     gimple.c:gimple_alloc_kind_names.  */
--- 4503,4508 ----
Index: gcc/ipa-struct-reorg.c
===================================================================
*** gcc/ipa-struct-reorg.c	(revision 147225)
--- gcc/ipa-struct-reorg.c	(revision 147226)
*************** find_pos_in_stmt_1 (tree *tp, int *walk_
*** 892,898 ****
  /* This function looks for the pointer of REF in STMT,
     It returns it, if found, and NULL otherwise.  */
  
! tree *
  find_pos_in_stmt (gimple stmt, tree ref)
  {
    struct ref_pos r_pos;
--- 892,898 ----
  /* This function looks for the pointer of REF in STMT,
     It returns it, if found, and NULL otherwise.  */
  
! static tree *
  find_pos_in_stmt (gimple stmt, tree ref)
  {
    struct ref_pos r_pos;
Index: gcc/tree.c
===================================================================
*** gcc/tree.c	(revision 147231)
--- gcc/tree.c	(revision 147232)
*************** iterative_hash_pointer (const void *ptr,
*** 3644,3655 ****
      }
  }
  
- hashval_t
- iterative_hash_gimple (gimple stmt, hashval_t val)
- {
-   return iterative_hash_pointer (stmt, val);
- }
- 
  /* Produce good hash value combining VAL and VAL2.  */
  static inline hashval_t
  iterative_hash_host_wide_int (HOST_WIDE_INT val, hashval_t val2)
--- 3644,3649 ----
Index: gcc/tree.h
===================================================================
*** gcc/tree.h	(revision 147231)
--- gcc/tree.h	(revision 147232)
*************** extern bool variably_modified_type_p (tr
*** 4836,4842 ****
  extern int tree_log2 (const_tree);
  extern int tree_floor_log2 (const_tree);
  extern int simple_cst_equal (const_tree, const_tree);
- extern hashval_t iterative_hash_gimple (gimple, hashval_t);
  extern hashval_t iterative_hash_expr (const_tree, hashval_t);
  extern hashval_t iterative_hash_exprs_commutative (const_tree,
                                                     const_tree, hashval_t);
--- 4836,4841 ----
Index: gcc/modulo-sched.c
===================================================================
*** gcc/modulo-sched.c	(revision 147231)
--- gcc/modulo-sched.c	(revision 147232)
*************** along with GCC; see the file COPYING3.  
*** 48,53 ****
--- 48,54 ----
  #include "timevar.h"
  #include "tree-pass.h"
  #include "dbgcnt.h"
+ #include "alias-export.h"
  
  #ifdef INSN_SCHEDULING
  
*************** rest_of_handle_sms (void)
*** 2875,2880 ****
--- 2876,2884 ----
        bb->aux = bb->next_bb;
    free_dominance_info (CDI_DOMINATORS);
    cfg_layout_finalize ();
+ 
+   if (flag_ddg_export)
+     ddg_export_set_pipelining_completed (true);
  #endif /* INSN_SCHEDULING */
    return 0;
  }
Index: gcc/sel-sched.c
===================================================================
*** gcc/sel-sched.c	(revision 147231)
--- gcc/sel-sched.c	(revision 147232)
*************** along with GCC; see the file COPYING3.  
*** 51,56 ****
--- 51,57 ----
  #include "sel-sched-dump.h"
  #include "sel-sched.h"
  #include "dbgcnt.h"
+ #include "alias-export.h"
  
  /* Implementation of selective scheduling approach.
     The below implementation follows the original approach with the following
*************** sel_global_finish (void)
*** 7306,7311 ****
--- 7307,7316 ----
  
    free_sched_pools ();
    free_dominance_info (CDI_DOMINATORS);
+ 
+   if (flag_ddg_export
+       && flag_sel_sched_pipelining)
+     ddg_export_set_pipelining_completed (true);
  }
  
  /* Return true when we need to skip selective scheduling.  Used for debugging.  */
Index: gcc/alias.c
===================================================================
*** gcc/alias.c	(revision 147231)
--- gcc/alias.c	(revision 147232)
*************** DEF_VEC_ALLOC_P(alias_set_entry,gc);
*** 252,290 ****
  /* The splay-tree used to store the various alias set entries.  */
  static GTY (()) VEC(alias_set_entry,gc) *alias_sets;
  
! /* Check MEM_ORIG_EXPRs of two MEMs and if they are present ask saved alias
!    information whether they may alias or not.  If the last parameter is 0 then
!    it is a dry run and do not count fail statistics.  */
  static bool
! query_alias_export_info (const_rtx x, const_rtx mem, int i)
  {
!   tree x_orig_expr = MEM_ORIG_EXPR (x), mem_orig_expr = MEM_ORIG_EXPR (mem);
    bool ret = true;
  
-   if (i == 0)
-     {
-       if (flag_alias_export == 1)
-         ret = alias_export_test (x_orig_expr, mem_orig_expr);
-       if (flag_ddg_export == 1 
-           && ret
-           && x_orig_expr != NULL 
-           && mem_orig_expr != NULL
-           && x_orig_expr != mem_orig_expr)
-         ret = ddg_export_may_alias_p (x_orig_expr, mem_orig_expr, i);
-       return ret;
-     }
-   
-   gcc_assert (i == 1);
- 
    if (x_orig_expr != NULL 
        && mem_orig_expr != NULL
        && x_orig_expr != mem_orig_expr)
      {
        if (flag_alias_export == 1)
!         ret = alias_export_may_alias_p (x_orig_expr, mem_orig_expr, x, mem);
        if (flag_ddg_export == 1
            && ret)
!         ret = ddg_export_may_alias_p (x_orig_expr, mem_orig_expr, i);
      }
  
    return ret;
--- 252,276 ----
  /* The splay-tree used to store the various alias set entries.  */
  static GTY (()) VEC(alias_set_entry,gc) *alias_sets;
  
! 
! /* Check MEM_ORIG_EXPRs of two MEMs and if they are present query saved alias/ddg
!    information whether they may alias or not.  */
  static bool
! query_alias_export_info (const_rtx x, const_rtx mem)
  {
!   tree x_orig_expr = MEM_ORIG_EXPR (x);
!   tree mem_orig_expr = MEM_ORIG_EXPR (mem);
    bool ret = true;
  
    if (x_orig_expr != NULL 
        && mem_orig_expr != NULL
        && x_orig_expr != mem_orig_expr)
      {
        if (flag_alias_export == 1)
!         ret = alias_export_may_alias_p (x_orig_expr, mem_orig_expr);
        if (flag_ddg_export == 1
            && ret)
!         ret = ddg_export_may_alias_p (x_orig_expr, mem_orig_expr, false);
      }
  
    return ret;
*************** walk_mems_2 (rtx *x, rtx mem)
*** 390,396 ****
        if (alias_sets_conflict_p (MEM_ALIAS_SET (*x), MEM_ALIAS_SET (mem))
            && (! flag_ddg_export
                || ddg_export_may_alias_p (MEM_ORIG_EXPR (*x),
!                                          MEM_ORIG_EXPR (mem), 2)))
          return 1;
          
        return -1;  
--- 376,382 ----
        if (alias_sets_conflict_p (MEM_ALIAS_SET (*x), MEM_ALIAS_SET (mem))
            && (! flag_ddg_export
                || ddg_export_may_alias_p (MEM_ORIG_EXPR (*x),
!                                          MEM_ORIG_EXPR (mem), true)))
          return 1;
          
        return -1;  
*************** true_dependence (const_rtx mem, enum mac
*** 2312,2318 ****
                              SIZE_FOR_MODE (x), x_addr, 0))
      return 0;
  
!   if (! query_alias_export_info (x, mem, 1))
      return 0;
  
    if (aliases_everything_p (x))
--- 2298,2304 ----
                              SIZE_FOR_MODE (x), x_addr, 0))
      return 0;
  
!   if (! query_alias_export_info (x, mem))
      return 0;
  
    if (aliases_everything_p (x))
*************** canon_true_dependence (const_rtx mem, en
*** 2379,2385 ****
                              SIZE_FOR_MODE (x), x_addr, 0))
      return 0;
  
!   if (! query_alias_export_info (x, mem, 1))
      return 0;
  
    if (aliases_everything_p (x))
--- 2365,2371 ----
                              SIZE_FOR_MODE (x), x_addr, 0))
      return 0;
  
!   if (! query_alias_export_info (x, mem))
      return 0;
  
    if (aliases_everything_p (x))
*************** write_dependence_p (const_rtx mem, const
*** 2455,2461 ****
                              SIZE_FOR_MODE (x), x_addr, 0))
      return 0;
  
!   if (! query_alias_export_info (x, mem, 1))
      return 0;
  
    fixed_scalar
--- 2441,2447 ----
                              SIZE_FOR_MODE (x), x_addr, 0))
      return 0;
  
!   if (! query_alias_export_info (x, mem))
      return 0;
  
    fixed_scalar
Index: gcc/alias-export.c
===================================================================
*** gcc/alias-export.c	(revision 147231)
--- gcc/alias-export.c	(revision 147232)
***************
*** 1,4 ****
! /* Export of alias information to RTL.  
     Copyright (C) 2009 Free Software Foundation, Inc.
  
  This file is part of GCC.
--- 1,4 ----
! /* Export of alias/data dependency information to RTL.  
     Copyright (C) 2009 Free Software Foundation, Inc.
  
  This file is part of GCC.
*************** along with GCC; see the file COPYING3.  
*** 25,47 ****
  #include "tm_p.h"
  #include "basic-block.h"
  #include "timevar.h"
  #include "ggc.h"
  #include "function.h"
- #include "diagnostic.h"
- #include "toplev.h"
  #include "tree-dump.h"
  #include "gimple.h"
  #include "tree-flow.h"
  #include "tree-pass.h"
- #include "tree-ssa-propagate.h"
  #include "tree-ssa-alias.h"
  #include "vec.h"
  #include "bitmap.h"
- #include "bitmap.h"
  #include "alias-export.h"
  #include "rtl.h"
  #include "pointer-set.h"
- #include "df.h"
  #include "dbgcnt.h"
  #include "cfgloop.h"
  #include "tree-data-ref.h"
--- 25,44 ----
  #include "tm_p.h"
  #include "basic-block.h"
  #include "timevar.h"
+ #include "diagnostic.h"
  #include "ggc.h"
+ #include "output.h"
  #include "function.h"
  #include "tree-dump.h"
  #include "gimple.h"
  #include "tree-flow.h"
  #include "tree-pass.h"
  #include "tree-ssa-alias.h"
  #include "vec.h"
  #include "bitmap.h"
  #include "alias-export.h"
  #include "rtl.h"
  #include "pointer-set.h"
  #include "dbgcnt.h"
  #include "cfgloop.h"
  #include "tree-data-ref.h"
*************** record_escaped_solution (struct pt_solut
*** 240,254 ****
      }
  }
  
- /* Mark bases that got addressable flags that they hadn't.  */
- void
- record_addressable_bases (tree t)
- {
-   if (!bases_got_addressable)
-     bases_got_addressable = pointer_set_create ();
-   pointer_set_insert (bases_got_addressable, t);
- }
- 
  /* Checks if two references conflict via trimmed oracle and pta info.  */
  static bool
  export_refs_may_alias_p (tree ref1, tree ref2)
--- 237,242 ----
*************** static int dry_run_number = 0;
*** 271,347 ****
  static int no_orig_expr_queries = 0;
  static int equal_orig_expr_queries = 0;
  static int not_found_expr_queries = 0;
- static bool last_dry_run = false;
  
  /* Functions to be called when needed to use exported information.  */
  
  /* Main function to ask saved information about if S1 and S2 may
     alias or not.  */
  bool
! alias_export_may_alias_p (tree s1, tree s2, const_rtx x, const_rtx mem)
  {
    /* Both oracles are tried for statistics purposes, but the answers are given
       only by the PTA-based oracle.  */
-   last_dry_run = false;
    if (! export_refs_may_alias_p (s1, s2))
      {
        real_ref_disambig_number++;
        return false;
      }
-   else if (dump_file)
-     {
-       if (false /* had_addressable_base */)
-         fprintf (dump_file, "\nWe failed because the base got addressable\n");
-       else if ((DECL_P (s1) 
-                 && TREE_CODE (s1) == PARM_DECL)
-                || (DECL_P (s2) 
-                    && TREE_CODE (s2) == PARM_DECL))
-         fprintf (dump_file, "\nThat was a PARM_DECL\n");
-       else
-         {
-           fprintf (dump_file, "\nPTA disambiguator failed!\n");
-           fprintf (dump_file, "1st MEM: ");
-           print_rtl_single (dump_file, x);
-           fprintf (dump_file, "1st expr: ");
-           print_generic_expr (dump_file, s1, TDF_VOPS | TDF_UID);
-           fprintf (dump_file, "2nd MEM: ");
-           print_rtl_single (dump_file, mem);
-           fprintf (dump_file, "2nd expr: ");
-           print_generic_expr (dump_file, s2, TDF_VOPS | TDF_UID);
-         }
-     }
- 
-   return true;
- }
- 
- /* Dry run.  Just gather statistic.  */
- bool
- alias_export_test (tree s1, tree s2)
- {
-   if (s1 == NULL || s2 == NULL)
-     {
-       no_orig_expr_queries++;
-       return true;
-     }
-   if (s1 == s2)
-     {
-       equal_orig_expr_queries++;
-       return true;
-     }
-   /* Dry run after another dry run means that refs were disambiguated without
-      export alias help.  */
-   if (last_dry_run)
-     dry_run_number++;
-   last_dry_run = true;
  
-   if (export_refs_may_alias_p (s1, s2))
-     disambig_ref_alias_number++;
-   else
-     {
-       disambig_ref_noalias_number++;
-       return false;
-     }
-   
    return true;
  }
  
--- 259,280 ----
  static int no_orig_expr_queries = 0;
  static int equal_orig_expr_queries = 0;
  static int not_found_expr_queries = 0;
  
  /* Functions to be called when needed to use exported information.  */
  
  /* Main function to ask saved information about if S1 and S2 may
     alias or not.  */
  bool
! alias_export_may_alias_p (tree s1, tree s2)
  {
    /* Both oracles are tried for statistics purposes, but the answers are given
       only by the PTA-based oracle.  */
    if (! export_refs_may_alias_p (s1, s2))
      {
        real_ref_disambig_number++;
        return false;
      }
  
    return true;
  }
  
*************** handle_report_aliases (void)
*** 462,470 ****
  {
    int total = disambig_ref_alias_number + disambig_ref_noalias_number;
  
-   /* Last dry run could have no paired good run, so increase counter here.  */
-   if (last_dry_run)
-     dry_run_number++;
    if (dump_file && flag_alias_export)
      {
        fprintf (dump_file,
--- 395,400 ----
*************** handle_report_aliases (void)
*** 494,500 ****
    no_orig_expr_queries = 0;
    equal_orig_expr_queries = 0;
    not_found_expr_queries = 0;
-   last_dry_run = false;
  
    if (flag_ddg_export)
      print_ddg_export_stats ();
--- 424,429 ----
*************** struct ddg_info_def
*** 530,536 ****
    /* TRUE for passes that perform code motion across loop branches, like SMS.
       For other passes we assume it is safe to disambiguate references that are
       dependent and distance vectors are known and non-zero.  */
!   bool disambiguate_only_intra_loop_deps;
  };
  
  typedef struct {
--- 459,465 ----
    /* TRUE for passes that perform code motion across loop branches, like SMS.
       For other passes we assume it is safe to disambiguate references that are
       dependent and distance vectors are known and non-zero.  */
!   bool pipelining_completed;
  };
  
  typedef struct {
*************** init_ddg_info (void)
*** 608,614 ****
     = htab_create (1, (htab_hash) htab_hash_datarefs_pair,
  		  (htab_eq) htab_eq_datarefs_pair,
  		  (htab_del) htab_del_datarefs_pair);
!   ddg_info->disambiguate_only_intra_loop_deps = false;
  }
  
  /* Save the data reference DRF in the ddg_info structure.  */
--- 537,543 ----
     = htab_create (1, (htab_hash) htab_hash_datarefs_pair,
  		  (htab_eq) htab_eq_datarefs_pair,
  		  (htab_del) htab_del_datarefs_pair);
!   ddg_info->pipelining_completed = false;
  }
  
  /* Save the data reference DRF in the ddg_info structure.  */
*************** walk_mems (rtx *x, void *data ATTRIBUTE_
*** 830,835 ****
--- 759,765 ----
  
        return -1;
      }
+   
    return 0;
  }
  
*************** remove_exported_ddg_data (rtx insn)
*** 841,854 ****
    for_each_rtx (&PATTERN (insn), walk_mems, NULL);
  }
  
! #if 0
  void
! ddg_export_disambiguate_only_intra_loop_deps (bool b)
  {
    if (ddg_info)
!     ddg_info->disambiguate_only_intra_loop_deps = b;
  }
- #endif
  
  /* Return TRUE if any of DIST_VECTS is non-zero.  */
  static bool
--- 771,783 ----
    for_each_rtx (&PATTERN (insn), walk_mems, NULL);
  }
  
! /* Set pipelining-completed to B.  */
  void
! ddg_export_set_pipelining_completed (bool b)
  {
    if (ddg_info)
!     ddg_info->pipelining_completed = b;
  }
  
  /* Return TRUE if any of DIST_VECTS is non-zero.  */
  static bool
*************** nonzero_dist_vects (VEC (lambda_vector, 
*** 866,877 ****
  }
  
  /* Return TRUE if we cannot prove from exported DDG info that MEM1 and MEM2
!    are independent memory references.  CALL is used to differentiate callers:
!    CALL=0 for early calls from RTL alias analysis, CALL=1 for late calls from
!    RTL alias analysis, CALL=2 for calls from modulo-scheduling DDG
!    construction.  */
  bool
! ddg_export_may_alias_p (tree t1, tree t2, int call)
  {
    data_reference_p drf1, drf2;
    ddr_p ddr;
--- 795,804 ----
  }
  
  /* Return TRUE if we cannot prove from exported DDG info that MEM1 and MEM2
!    are independent memory references.  When FOR_PIPELINING is true, do not
!    disambiguate references with non-zero distances.  */
  bool
! ddg_export_may_alias_p (tree t1, tree t2, bool for_pipelining)
  {
    data_reference_p drf1, drf2;
    ddr_p ddr;
*************** ddg_export_may_alias_p (tree t1, tree t2
*** 882,942 ****
    drf1 = find_dataref (t1);
    drf2 = find_dataref (t2);
    if (!drf1 || !drf2)
!     {
!       if (call == 1)
! 	ddg_info->alias_fail_graceful++;
!       else
! 	ddg_info->alias_fail_no_drf++;
!       return true;
!     }
  
    ddr = find_ddr (drf1, drf2);
    if (!ddr)
!     {
!       if (call == 1)
! 	ddg_info->alias_fail_graceful++;
!       else
! 	ddg_info->alias_fail_no_ddr++;
!       return true;
!     }
  
    if (DDR_ARE_DEPENDENT (ddr) == chrec_known)
!     {
!       if (call != 1)
! 	ddg_info->alias_success_no_dep++;
! 
! account_new:
! 
!       if (call == 0)
! 	ddg_info->alias_success_useless++;
!       else if (call == 1)
! 	{
! 	  ddg_info->alias_success_useless--;
! 	  ddg_info->alias_success_new++;
! 	}
!       else
! 	{
! 	  gcc_assert (call == 2);
! 	  ddg_info->alias_success_new++;
! 	}
!       return false;
!     }
! 
    if (DDR_ARE_DEPENDENT (ddr) == NULL_TREE 
        && DDR_NUM_DIST_VECTS (ddr) > 0
!       && !ddg_info->disambiguate_only_intra_loop_deps
        && nonzero_dist_vects (DDR_DIST_VECTS (ddr), DDR_NB_LOOPS (ddr)))
!     {
!       if (call != 1)
! 	ddg_info->alias_success_nonzero_dist++;
! 
!       goto account_new;
!     }
! 
!   if (call == 1)
!     ddg_info->alias_fail_graceful++;
!   else
!     ddg_info->alias_fail_useless_ddr++;
    return true;
  }
  
--- 809,830 ----
    drf1 = find_dataref (t1);
    drf2 = find_dataref (t2);
    if (!drf1 || !drf2)
!     return true;
  
    ddr = find_ddr (drf1, drf2);
    if (!ddr)
!     return true;
  
    if (DDR_ARE_DEPENDENT (ddr) == chrec_known)
!     return false;
!   
    if (DDR_ARE_DEPENDENT (ddr) == NULL_TREE 
        && DDR_NUM_DIST_VECTS (ddr) > 0
!       && ! for_pipelining
!       && ! ddg_info->pipelining_completed
        && nonzero_dist_vects (DDR_DIST_VECTS (ddr), DDR_NB_LOOPS (ddr)))
!     return false;
!   
    return true;
  }
  
Index: gcc/alias-export.h
===================================================================
*** gcc/alias-export.h	(revision 147231)
--- gcc/alias-export.h	(revision 147232)
*************** along with GCC; see the file COPYING3.  
*** 25,39 ****
  extern tree unshare_and_record_pta_info (tree);
  extern void record_escaped_solution (struct pt_solution *);
  extern void record_stack_var_partition_for (tree, tree);
- extern void record_addressable_bases (tree);
  extern struct ptr_info_def * get_exported_ptr_info (tree);
  
! extern bool alias_export_may_alias_p (tree, tree, const_rtx, const_rtx);
! extern bool alias_export_test (tree, tree);
! 
! extern bool ddg_export_may_alias_p (tree, tree, int);
  extern void replace_var_in_datarefs (tree, tree);
  extern void remove_exported_ddg_data (rtx);
! 
  
  #endif /* GCC_ALIAS_EXPORT_H */
--- 25,36 ----
  extern tree unshare_and_record_pta_info (tree);
  extern void record_escaped_solution (struct pt_solution *);
  extern void record_stack_var_partition_for (tree, tree);
  extern struct ptr_info_def * get_exported_ptr_info (tree);
  
! extern bool alias_export_may_alias_p (tree, tree);
! extern bool ddg_export_may_alias_p (tree, tree, bool);
  extern void replace_var_in_datarefs (tree, tree);
  extern void remove_exported_ddg_data (rtx);
! extern void ddg_export_set_pipelining_completed (bool);
  
  #endif /* GCC_ALIAS_EXPORT_H */
Index: gcc/emit-rtl.c
===================================================================
*** gcc/emit-rtl.c	(revision 147231)
--- gcc/emit-rtl.c	(revision 147232)
*************** mem_attrs_htab_hash (const void *x)
*** 299,305 ****
    return (p->alias ^ (p->align * 1000)
  	  ^ ((p->offset ? INTVAL (p->offset) : 0) * 50000)
  	  ^ ((p->size ? INTVAL (p->size) : 0) * 2500000)
! 	  ^ (p->orig_expr ? (unsigned long) p->orig_expr : 0));
  }
  
  /* Returns nonzero if the value represented by X (which is really a
--- 299,307 ----
    return (p->alias ^ (p->align * 1000)
  	  ^ ((p->offset ? INTVAL (p->offset) : 0) * 50000)
  	  ^ ((p->size ? INTVAL (p->size) : 0) * 2500000)
! 	  ^ (size_t) iterative_hash_expr (p->expr, 
!                                           iterative_hash_expr (p->orig_expr, 
!                                                                0)));
  }
  
  /* Returns nonzero if the value represented by X (which is really a
Index: gcc/Makefile.in
===================================================================
*** gcc/Makefile.in	(revision 147231)
--- gcc/Makefile.in	(revision 147232)
*************** convert.o: convert.c $(CONFIG_H) $(SYSTE
*** 2060,2068 ****
  
  double-int.o: double-int.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H)
  
! alias-export.o : alias-export.c \
!    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(TREE_DUMP_H) \
!    $(FUNCTION_H) $(DIAGNOSTIC_H)
  
  langhooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
     $(TREE_H) $(TOPLEV_H) $(TREE_INLINE_H) $(RTL_H) insn-config.h $(INTEGRATE_H) \
--- 2060,2072 ----
  
  double-int.o: double-int.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H)
  
! alias-export.o : alias-export.c alias-export.h 	\
!    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(BASIC_BLOCK_H) \
!    $(FUNCTION_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(GGC_H) output.h $(TREE_FLOW_H) \
!    $(RTL_H) $(TREE_PASS_H) $(FLAGS_H) tree-ssa-alias.h vec.h bitmap.h \
!    pointer-set.h dbgcnt.h $(CFGLOOP_H) tree-data-ref.h tree-scalar-evolution.h \
!    $(DIAGNOSTIC_H)  
! 
  
  langhooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
     $(TREE_H) $(TOPLEV_H) $(TREE_INLINE_H) $(RTL_H) insn-config.h $(INTEGRATE_H) \
*************** tree-ssa.o : tree-ssa.c $(TREE_FLOW_H) $
*** 2101,2107 ****
     $(TOPLEV_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
     $(TREE_DUMP_H) langhooks.h $(TREE_PASS_H) $(BASIC_BLOCK_H) $(BITMAP_H) \
     $(FLAGS_H) $(GGC_H) hard-reg-set.h $(HASHTAB_H) pointer-set.h \
!    $(GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_H)
  tree-into-ssa.o : tree-into-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
     $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \
     $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
--- 2105,2111 ----
     $(TOPLEV_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
     $(TREE_DUMP_H) langhooks.h $(TREE_PASS_H) $(BASIC_BLOCK_H) $(BITMAP_H) \
     $(FLAGS_H) $(GGC_H) hard-reg-set.h $(HASHTAB_H) pointer-set.h \
!    $(GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_H) alias-export.h
  tree-into-ssa.o : tree-into-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
     $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \
     $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
*************** tree-ssa-loop-ivopts.o : tree-ssa-loop-i
*** 2293,2299 ****
     output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
     $(TREE_PASS_H) $(GGC_H) $(RECOG_H) insn-config.h $(HASHTAB_H) $(SCEV_H) \
     $(CFGLOOP_H) $(PARAMS_H) langhooks.h $(BASIC_BLOCK_H) hard-reg-set.h \
!    tree-chrec.h $(VARRAY_H) tree-affine.h pointer-set.h $(TARGET_H)
  tree-affine.o : tree-affine.c tree-affine.h $(CONFIG_H) pointer-set.h \
     $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) hard-reg-set.h $(GIMPLE_H) \
     output.h $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(FLAGS_H)
--- 2297,2303 ----
     output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
     $(TREE_PASS_H) $(GGC_H) $(RECOG_H) insn-config.h $(HASHTAB_H) $(SCEV_H) \
     $(CFGLOOP_H) $(PARAMS_H) langhooks.h $(BASIC_BLOCK_H) hard-reg-set.h \
!    tree-chrec.h $(VARRAY_H) tree-affine.h pointer-set.h $(TARGET_H) alias-export.h
  tree-affine.o : tree-affine.c tree-affine.h $(CONFIG_H) pointer-set.h \
     $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) hard-reg-set.h $(GIMPLE_H) \
     output.h $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(FLAGS_H)
*************** tree-ssa-alias.o : tree-ssa-alias.c $(TR
*** 2315,2321 ****
     $(FUNCTION_H) $(TIMEVAR_H) convert.h $(TM_H) coretypes.h langhooks.h \
     $(TREE_DUMP_H) $(TREE_PASS_H) $(PARAMS_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \
     hard-reg-set.h $(GIMPLE_H) vec.h \
!    $(IPA_TYPE_ESCAPE_H) vecprim.h pointer-set.h alloc-pool.h
  tree-ssa-reassoc.o : tree-ssa-reassoc.c $(TREE_FLOW_H) $(CONFIG_H) \
     $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
     $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) \
--- 2319,2325 ----
     $(FUNCTION_H) $(TIMEVAR_H) convert.h $(TM_H) coretypes.h langhooks.h \
     $(TREE_DUMP_H) $(TREE_PASS_H) $(PARAMS_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \
     hard-reg-set.h $(GIMPLE_H) vec.h \
!    $(IPA_TYPE_ESCAPE_H) vecprim.h pointer-set.h alloc-pool.h alias-export.h
  tree-ssa-reassoc.o : tree-ssa-reassoc.c $(TREE_FLOW_H) $(CONFIG_H) \
     $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
     $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) \
*************** loop-unswitch.o : loop-unswitch.c $(CONF
*** 2861,2867 ****
  loop-unroll.o: loop-unroll.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_H) \
     $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) $(PARAMS_H) \
     output.h $(EXPR_H) coretypes.h $(TM_H) $(HASHTAB_H) $(RECOG_H) \
!    $(OBSTACK_H)
  dominance.o : dominance.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
     hard-reg-set.h $(BASIC_BLOCK_H) et-forest.h $(OBSTACK_H) $(TOPLEV_H) \
     $(TIMEVAR_H) graphds.h vecprim.h pointer-set.h
--- 2865,2871 ----
  loop-unroll.o: loop-unroll.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_H) \
     $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) $(PARAMS_H) \
     output.h $(EXPR_H) coretypes.h $(TM_H) $(HASHTAB_H) $(RECOG_H) \
!    $(OBSTACK_H) alias-export.h 
  dominance.o : dominance.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
     hard-reg-set.h $(BASIC_BLOCK_H) et-forest.h $(OBSTACK_H) $(TOPLEV_H) \
     $(TIMEVAR_H) graphds.h vecprim.h pointer-set.h
*************** reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H
*** 2920,2926 ****
  alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
     $(FLAGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) $(TOPLEV_H) output.h \
     $(ALIAS_H) $(EMIT_RTL_H) $(GGC_H) $(FUNCTION_H) cselib.h $(TREE_H) $(TM_P_H) \
!    langhooks.h $(TARGET_H) gt-alias.h $(TIMEVAR_H) $(CGRAPH_H) \
     $(SPLAY_TREE_H) $(VARRAY_H) $(IPA_TYPE_ESCAPE_H) $(DF_H) $(TREE_PASS_H)
  stack-ptr-mod.o : stack-ptr-mod.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
     $(TM_H) $(TREE_H) $(RTL_H) $(REGS_H) $(EXPR_H) $(TREE_PASS_H) \
--- 2924,2930 ----
  alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
     $(FLAGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) $(TOPLEV_H) output.h \
     $(ALIAS_H) $(EMIT_RTL_H) $(GGC_H) $(FUNCTION_H) cselib.h $(TREE_H) $(TM_P_H) \
!    langhooks.h $(TARGET_H) gt-alias.h $(TIMEVAR_H) $(CGRAPH_H) alias-export.h \
     $(SPLAY_TREE_H) $(VARRAY_H) $(IPA_TYPE_ESCAPE_H) $(DF_H) $(TREE_PASS_H)
  stack-ptr-mod.o : stack-ptr-mod.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
     $(TM_H) $(TREE_H) $(RTL_H) $(REGS_H) $(EXPR_H) $(TREE_PASS_H) \
*************** modulo-sched.o : modulo-sched.c $(DDG_H)
*** 2977,2983 ****
     $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) \
     $(SCHED_INT_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(EXPR_H) $(PARAMS_H) \
     cfghooks.h $(GCOV_IO_H) hard-reg-set.h $(TM_H) $(TIMEVAR_H) $(TREE_PASS_H) \
!    $(DF_H) $(DBGCNT_H)
  haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
     $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(FUNCTION_H) \
     $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(TM_P_H) $(TARGET_H) output.h \
--- 2981,2987 ----
     $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) \
     $(SCHED_INT_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(EXPR_H) $(PARAMS_H) \
     cfghooks.h $(GCOV_IO_H) hard-reg-set.h $(TM_H) $(TIMEVAR_H) $(TREE_PASS_H) \
!    $(DF_H) $(DBGCNT_H) alias-export.h
  haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
     $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(FUNCTION_H) \
     $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(TM_P_H) $(TARGET_H) output.h \
*************** sel-sched.o : sel-sched.c $(CONFIG_H) $(
*** 3003,3009 ****
     $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
     $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) $(TREE_PASS_H)  \
     $(SCHED_INT_H) $(GGC_H) $(TREE_H) $(LANGHOOKS_DEF_H) \
!    $(SEL_SCHED_IR_H) $(SEL_SCHED_DUMP_H) sel-sched.h
  sel-sched-dump.o : sel-sched-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
     $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
     $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
--- 3007,3013 ----
     $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
     $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) $(TREE_PASS_H)  \
     $(SCHED_INT_H) $(GGC_H) $(TREE_H) $(LANGHOOKS_DEF_H) \
!    $(SEL_SCHED_IR_H) $(SEL_SCHED_DUMP_H) sel-sched.h alias-export.h
  sel-sched-dump.o : sel-sched-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
     $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
     $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
Index: gcc/tree-pass.h
===================================================================
*** gcc/tree-pass.h	(revision 147232)
--- gcc/tree-pass.h	(revision 147233)
*************** extern struct rtl_opt_pass pass_branch_t
*** 494,504 ****
  extern struct rtl_opt_pass pass_leaf_regs;
  extern struct rtl_opt_pass pass_split_before_sched2;
  extern struct rtl_opt_pass pass_sched2;
- 
- extern struct rtl_opt_pass pass_free_alias_export;
  extern struct gimple_opt_pass pass_gather_ddg_info;
- extern struct rtl_opt_pass pass_free_ddg_info;
- 
  extern struct rtl_opt_pass pass_stack_regs;
  extern struct rtl_opt_pass pass_stack_regs_run;
  extern struct rtl_opt_pass pass_df_finish;
--- 494,500 ----
Index: gcc/final.c
===================================================================
*** gcc/final.c	(revision 147232)
--- gcc/final.c	(revision 147233)
*************** along with GCC; see the file COPYING3.  
*** 79,84 ****
--- 79,85 ----
  #include "vecprim.h"
  #include "ggc.h"
  #include "cfgloop.h"
+ #include "alias-export.h"
  #include "params.h"
  
  #ifdef XCOFF_DEBUGGING_INFO
*************** rest_of_clean_state (void)
*** 4314,4319 ****
--- 4315,4325 ----
  
    free_bb_for_insn ();
  
+   if (flag_alias_export)
+     free_alias_export_info ();
+   if (flag_ddg_export)
+     free_ddg_export_info ();
+ 
    if (targetm.binds_local_p (current_function_decl))
      {
        unsigned int pref = crtl->preferred_stack_boundary;
Index: gcc/alias-export.c
===================================================================
*** gcc/alias-export.c	(revision 147232)
--- gcc/alias-export.c	(revision 147233)
*************** alias_export_may_alias_p (tree s1, tree 
*** 278,286 ****
    return true;
  }
  
! /* Cleanup pass.  */
! static unsigned int
! handle_free_aliases (void)
  {
    if (exprs_to_ptas)
      {
--- 278,286 ----
    return true;
  }
  
! /* Free exported info.  */
! void
! free_alias_export_info (void)
  {
    if (exprs_to_ptas)
      {
*************** handle_free_aliases (void)
*** 312,345 ****
        pointer_set_destroy (bases_got_addressable);
        bases_got_addressable = NULL;
      }
-   return 0;
  }
  
- static bool
- gate_free_aliases (void)
- {
-   return flag_alias_export != 0;
- }
- 
- struct rtl_opt_pass pass_free_alias_export =
- {
-  {
-   RTL_PASS,
-   "aliasexpfree",                       /* name */
-   gate_free_aliases,                    /* gate */
-   handle_free_aliases,                  /* execute */
-   NULL,                                 /* sub */
-   NULL,                                 /* next */
-   0,                                    /* static_pass_number */
-   TV_NONE,                              /* tv_id */
-   0,                                    /* properties_required */
-   0,                                    /* properties_provided */
-   0,                                    /* properties_destroyed */
-   0,                                    /* todo_flags_start */
-   TODO_ggc_collect                      /* todo_flags_finish */
-  }
- };
- 
  
  static int unit_total = 0;
  static int unit_real_ref_disambig_number = 0;
--- 312,319 ----
*************** handle_report_aliases (void)
*** 432,442 ****
  
  
  /* Data dependence export.  */
! /* Holds exported data references and relations.  */
  struct ddg_info_def
  {
    htab_t tree_to_dataref;
  
    htab_t datarefs_pair_to_ddr;
  
    /* Used by the verifier.  */
--- 406,419 ----
  
  
  /* Data dependence export.  */
! /* This structure holds exported data references and relations.  */
  struct ddg_info_def
  {
+ 
+   /* A hashtable for tree -> dataref mapping.  */
    htab_t tree_to_dataref;
  
+   /* A hashtable for mapping dataref pairs to data dependence relation.  */
    htab_t datarefs_pair_to_ddr;
  
    /* Used by the verifier.  */
*************** struct gimple_opt_pass pass_gather_ddg_i
*** 853,863 ****
   }
  };
  
! static unsigned int
! free_ddg_info (void)
  {
    if (!ddg_info)
!     return 0;
  
    /* TODO: DDR_LOOP_NESTs are not free'd.  */
    htab_delete (ddg_info->datarefs_pair_to_ddr);
--- 830,841 ----
   }
  };
  
! /* Free ddg export info.  */
! void
! free_ddg_export_info (void)
  {
    if (!ddg_info)
!     return;
  
    /* TODO: DDR_LOOP_NESTs are not free'd.  */
    htab_delete (ddg_info->datarefs_pair_to_ddr);
*************** free_ddg_info (void)
*** 865,892 ****
  
    free (ddg_info);
    ddg_info = NULL;
-   return 0;
  }
  
- struct rtl_opt_pass pass_free_ddg_info =
- {
-  {
-   RTL_PASS,
-   NULL,					/* name */
-   NULL,					/* gate */
-   free_ddg_info,			/* execute */
-   NULL,					/* sub */
-   NULL,					/* next */
-   0,					/* static_pass_number */
-   TV_NONE,				/* tv_id */
-   0,					/* properties_required */
-   0,					/* properties_provided */
-   0,					/* properties_destroyed */
-   0,					/* todo_flags_start */
-   0					/* todo_flags_finish */
-  }
- };
- 
- 
- 
  
--- 843,848 ----
Index: gcc/alias-export.h
===================================================================
*** gcc/alias-export.h	(revision 147232)
--- gcc/alias-export.h	(revision 147233)
*************** extern void replace_var_in_datarefs (tre
*** 33,36 ****
--- 33,39 ----
  extern void remove_exported_ddg_data (rtx);
  extern void ddg_export_set_pipelining_completed (bool);
  
+ extern void free_alias_export_info (void);
+ extern void free_ddg_export_info (void);
+ 
  #endif /* GCC_ALIAS_EXPORT_H */
Index: gcc/Makefile.in
===================================================================
*** gcc/Makefile.in	(revision 147232)
--- gcc/Makefile.in	(revision 147233)
*************** final.o : final.c $(CONFIG_H) $(SYSTEM_H
*** 3024,3030 ****
     $(EXCEPT_H) debug.h xcoffout.h $(TOPLEV_H) reload.h dwarf2out.h \
     $(TREE_PASS_H) $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H) $(EXPR_H) \
     $(CFGLAYOUT_H) dbxout.h $(TIMEVAR_H) $(CGRAPH_H) $(COVERAGE_H) $(REAL_H) \
!    $(DF_H) vecprim.h $(GGC_H) $(CFGLOOP_H) $(PARAMS_H)
  recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
     $(FUNCTION_H) $(BASIC_BLOCK_H) $(REGS_H) $(RECOG_H) $(EXPR_H) \
     $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(TOPLEV_H) output.h reload.h \
--- 3024,3030 ----
     $(EXCEPT_H) debug.h xcoffout.h $(TOPLEV_H) reload.h dwarf2out.h \
     $(TREE_PASS_H) $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H) $(EXPR_H) \
     $(CFGLAYOUT_H) dbxout.h $(TIMEVAR_H) $(CGRAPH_H) $(COVERAGE_H) $(REAL_H) \
!    $(DF_H) vecprim.h $(GGC_H) $(CFGLOOP_H) $(PARAMS_H) alias-export.h
  recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
     $(FUNCTION_H) $(BASIC_BLOCK_H) $(REGS_H) $(RECOG_H) $(EXPR_H) \
     $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(TOPLEV_H) output.h reload.h \
Index: gcc/passes.c
===================================================================
*** gcc/passes.c	(revision 147232)
--- gcc/passes.c	(revision 147233)
*************** init_optimization_passes (void)
*** 811,820 ****
  	  NEXT_PASS (pass_variable_tracking);
  	  NEXT_PASS (pass_free_cfg);
  	  NEXT_PASS (pass_machine_reorg);
- 
- 	  NEXT_PASS (pass_free_alias_export);
- 	  NEXT_PASS (pass_free_ddg_info);
- 
  	  NEXT_PASS (pass_cleanup_barriers);
  	  NEXT_PASS (pass_delay_slots);
  	  NEXT_PASS (pass_split_for_shorten_branches);
--- 811,816 ----
Index: gcc/toplev.c
===================================================================
*** gcc/toplev.c	(revision 147239)
--- gcc/toplev.c	(revision 147240)
*************** finalize (void)
*** 2221,2227 ****
    finish_optimization_passes ();
  
    ira_finish_once ();
-   alias_export_finish_once ();
  
    if (mem_report)
      dump_memory_report (true);
--- 2221,2226 ----
Index: gcc/alias-export.c
===================================================================
*** gcc/alias-export.c	(revision 147239)
--- gcc/alias-export.c	(revision 147240)
*************** along with GCC; see the file COPYING3.  
*** 43,48 ****
--- 43,49 ----
  #include "cfgloop.h"
  #include "tree-data-ref.h"
  #include "tree-scalar-evolution.h"
+ #include "statistics.h"
  
  /* The final orig_expr -> pt set map used in RTL.  */
  static struct pointer_map_t *exprs_to_ptas = NULL;
*************** static struct pointer_map_t *part_repr_t
*** 58,63 ****
--- 59,108 ----
     set bits corresponding to decl uids of a partition.  */
  static struct pointer_map_t *part_repr_to_part = NULL;
  
+ /* Saved escaped points-to solution.  */
+ static struct pt_solution gimple_df_escaped;
+ 
+ /* Alias export statistics counter.  */
+ static unsigned int alias_export_disambiguations = 0;
+ 
+ 
+ /* This structure holds exported data references and relations.  */
+ struct ddg_info_def
+ {
+ 
+   /* A hashtable for tree -> dataref mapping.  */
+   htab_t tree_to_dataref;
+ 
+   /* A hashtable for mapping dataref pairs to data dependence relation.  */
+   htab_t datarefs_pair_to_ddr;
+ 
+   /* TRUE for passes that perform code motion across loop branches, like SMS.
+      For other passes we assume it is safe to disambiguate references that are
+      dependent and distance vectors are known and non-zero.  */
+   bool pipelining_completed;
+ };
+ 
+ /* A struct holding dataref information for a given tree.  */
+ typedef struct {
+   const_tree ref;
+   data_reference_p drf;
+ } tree_dataref;
+ 
+ /* A struct for holding data dependence relations for datarefs pairs.  */
+ typedef struct {
+   data_reference_p a;
+   data_reference_p b;
+   ddr_p ddr;
+ } datarefs_pair_ddr;
+ 
+ /* Data references and data dependence relations exported from Tree-SSA
+    level for use on RTL level.  */
+ static struct ddg_info_def *ddg_info;
+ 
+ /* DDG export statistics counter.  */
+ static unsigned int ddg_export_disambiguations = 0;
+ 
+ 
  /* Return the pointer on which REF access is based, or NULL, 
     if there's no such thing.  */
  static tree
*************** get_exported_ptr_info (tree expr)
*** 222,230 ****
    return NULL;
  }
  
- static struct pt_solution gimple_df_escaped;
- static struct pointer_set_t *bases_got_addressable = NULL;
- 
  /* Save the above solution.  */
  void
  record_escaped_solution (struct pt_solution *escaped)
--- 267,272 ----
*************** record_escaped_solution (struct pt_solut
*** 237,245 ****
      }
  }
  
! /* Checks if two references conflict via trimmed oracle and pta info.  */
! static bool
! export_refs_may_alias_p (tree ref1, tree ref2)
  {
    struct ptr_info_def *pid1, *pid2;
    
--- 279,290 ----
      }
  }
  
! /* Functions to be called when needed to use exported information.  */
! 
! /* Main function to ask saved information about if REF1 and REF2 may
!    alias or not.  */
! bool
! alias_export_may_alias_p (tree ref1, tree ref2)
  {
    struct ptr_info_def *pid1, *pid2;
    
*************** export_refs_may_alias_p (tree ref1, tree
*** 248,277 ****
    
    pid1 = get_exported_ptr_info (ref1);
    pid2 = get_exported_ptr_info (ref2);
!   return refs_may_alias_p_1 (ref1, ref2, pid1, pid2, &gimple_df_escaped);
! }
! 
! /* Statistics counters.  */
! static int disambig_ref_alias_number = 0;
! static int disambig_ref_noalias_number = 0;
! static int real_ref_disambig_number = 0;
! static int dry_run_number = 0;
! static int no_orig_expr_queries = 0;
! static int equal_orig_expr_queries = 0;
! static int not_found_expr_queries = 0;
! 
! /* Functions to be called when needed to use exported information.  */
! 
! /* Main function to ask saved information about if S1 and S2 may
!    alias or not.  */
! bool
! alias_export_may_alias_p (tree s1, tree s2)
! {
!   /* Both oracles are tried for statistics purposes, but the answers are given
!      only by the PTA-based oracle.  */
!   if (! export_refs_may_alias_p (s1, s2))
      {
!       real_ref_disambig_number++;
        return false;
      }
  
--- 293,301 ----
    
    pid1 = get_exported_ptr_info (ref1);
    pid2 = get_exported_ptr_info (ref2);
!   if (! refs_may_alias_p_1 (ref1, ref2, pid1, pid2, &gimple_df_escaped))
      {
!       alias_export_disambiguations++;
        return false;
      }
  
*************** alias_export_may_alias_p (tree s1, tree 
*** 282,287 ****
--- 306,315 ----
  void
  free_alias_export_info (void)
  {
+   statistics_counter_event (cfun, "Alias export disambiguations", 
+                             alias_export_disambiguations);
+   alias_export_disambiguations = 0;
+ 
    if (exprs_to_ptas)
      {
        pointer_map_destroy (exprs_to_ptas);
*************** free_alias_export_info (void)
*** 307,452 ****
        BITMAP_FREE (gimple_df_escaped.vars);
        memset (&gimple_df_escaped, 0, sizeof gimple_df_escaped);
      }
-   if (bases_got_addressable)
-     {
-       pointer_set_destroy (bases_got_addressable);
-       bases_got_addressable = NULL;
-     }
- }
- 
- 
- static int unit_total = 0;
- static int unit_real_ref_disambig_number = 0;
- static int unit_dry_run_number = 0;
- static int unit_no_orig_expr_number = 0;
- static int unit_equal_orig_expr_number = 0;
- static int unit_not_found_expr_number = 0;
- static void print_ddg_export_stats (void);
- 
- static bool
- gate_report_aliases (void)
- {
-   return ((flag_alias_export == 1
-            || flag_ddg_export == 1)
-           && false);
- }
- 
- void alias_export_finish_once (void)
- {
-   FILE *report_file;
-   int unit_good_queries;
- 
-   if (! gate_report_aliases ())
-     return;
-   
-   report_file = stderr;
-   unit_good_queries = unit_total - unit_dry_run_number;
-   if (report_file)
-     {
-       fprintf (report_file,
-                "====== Statistics for export aliasing information =======\n");
-       fprintf (report_file, "   Total queries per unit: %d\n", unit_total);
-       fprintf (report_file, "   Dry queries: %d (%d%%)\n", unit_dry_run_number,
-                (unit_dry_run_number * 100) / (unit_total == 0 ? 100 : unit_total));
-       fprintf (report_file, "   Helpful unit queries (ref): %d (%d%%)\n", 
-                unit_real_ref_disambig_number,
-                (unit_real_ref_disambig_number * 100) / (unit_good_queries == 0 ? 
-                                                         100 : unit_good_queries));
-       fprintf (report_file, "   No info saved queries: %d (%d%%)\n", 
-                unit_not_found_expr_number,
-                (unit_not_found_expr_number * 100) / (unit_good_queries == 0 ? 
-                                                      100 : unit_good_queries));
-       fprintf (report_file, "   Queries with null orig exprs: %d\n",
-                unit_no_orig_expr_number);
-       fprintf (report_file, "   Queries with equal orig exprs: %d\n",
-                unit_equal_orig_expr_number);
-     }
- }
- 
- /* Reports gathered statistic.  */
- static unsigned int ATTRIBUTE_UNUSED
- handle_report_aliases (void)
- {
-   int total = disambig_ref_alias_number + disambig_ref_noalias_number;
- 
-   if (dump_file && flag_alias_export)
-     {
-       fprintf (dump_file,
-                "====== Statistics for export aliasing information =======\n");
-       fprintf (dump_file, "   Total queries: %d\n", total);
-       fprintf (dump_file, "   Helpful queries: %d\n", real_ref_disambig_number);
-       fprintf (dump_file, "   Dry queries: %d (%d%%)\n", dry_run_number,
-                (dry_run_number * 100) / (total == 0 ? 100 : total));
-       fprintf (dump_file, "   Aliased queries (ref): %d\n", disambig_ref_alias_number);
-       fprintf (dump_file, "   Non-aliased queries (ref): %d\n", disambig_ref_noalias_number);
-       fprintf (dump_file, "   Queries with null orig exprs: %d\n",
-                no_orig_expr_queries);
-       fprintf (dump_file, "   Queries with equal orig exprs: %d\n",
-                equal_orig_expr_queries);
-     }
-   unit_total += total;
-   unit_real_ref_disambig_number += real_ref_disambig_number;
-   unit_dry_run_number += dry_run_number;
-   unit_no_orig_expr_number += no_orig_expr_queries;
-   unit_equal_orig_expr_number += equal_orig_expr_queries;
-   unit_not_found_expr_number += not_found_expr_queries;
- 
-   disambig_ref_noalias_number = 0;
-   disambig_ref_alias_number = 0;
-   real_ref_disambig_number = 0;
-   dry_run_number = 0;
-   no_orig_expr_queries = 0;
-   equal_orig_expr_queries = 0;
-   not_found_expr_queries = 0;
- 
-   if (flag_ddg_export)
-     print_ddg_export_stats ();
-   return 0;
  }
  
  
  /* Data dependence export.  */
- /* This structure holds exported data references and relations.  */
- struct ddg_info_def
- {
- 
-   /* A hashtable for tree -> dataref mapping.  */
-   htab_t tree_to_dataref;
- 
-   /* A hashtable for mapping dataref pairs to data dependence relation.  */
-   htab_t datarefs_pair_to_ddr;
- 
-   /* Used by the verifier.  */
-   VEC (data_reference_p, heap) *verifier_seen_datarefs;
- 
-   int ddrs_known, ddrs_no, ddrs_unknown, ddrs_not_found;
- 
-   /* Number of memory references without/with relevant exported info.  */
-   int refs_bad, refs_ok;
- 
-   /* Statistics on DDG info usage in RTL disambiguation.  */
-   int alias_fail_no_tree, alias_fail_no_drf, alias_fail_no_ddr,
-       alias_fail_useless_ddr, alias_fail_graceful, alias_success_useless,
-       alias_success_new, alias_success_no_dep, alias_success_nonzero_dist;
- 
-   /* Whether we should skip verification of exported data.  Enabled as late as
-      possible in the RTL pipeline by a separate pass.  */
-   bool skip_verification;
- 
-   /* TRUE for passes that perform code motion across loop branches, like SMS.
-      For other passes we assume it is safe to disambiguate references that are
-      dependent and distance vectors are known and non-zero.  */
-   bool pipelining_completed;
- };
- 
- typedef struct {
-   const_tree ref;
-   data_reference_p drf;
- } tree_dataref;
- 
- /* Data references and data dependence relations exported from Tree-SSA
-    level for use on RTL level.  */
- static struct ddg_info_def *ddg_info;
  
  /* Hash a dataref T.  */
  static hashval_t
--- 335,344 ----
*************** htab_del_tree_dataref (tree_dataref *t)
*** 470,482 ****
      free_data_ref (t->drf);
  }
  
- /* A struct for holding data dependence relations for datarefs pairs.  */
- typedef struct {
-   data_reference_p a;
-   data_reference_p b;
-   ddr_p ddr;
- } datarefs_pair_ddr;
- 
  /* Hash function for the above.  */
  static hashval_t
  htab_hash_datarefs_pair (const datarefs_pair_ddr *dp)
--- 362,367 ----
*************** find_ddr (data_reference_p dr1, data_ref
*** 693,728 ****
    return pdp ? pdp->ddr : NULL;
  }
  
- /* Depending on current IR, either check that we have saved datarefs for all
-    memory references, or we have MEM_ORIG_EXPRs for MEMs.  */
- static void
- print_ddg_export_stats (void)
- {
-   if (!ddg_info || !dump_file)
-     return;
- 
-   if (dump_flags & TDF_STATS)
-     fprintf (dump_file,
-              "DDG info usage in RTL aliasing: %d no tree, %d no drf, %d no ddr, "
-              "%d useless ddr, %d graceful fails, %d useless successes, "
-              "%d new successes, %d no dep, %d nonzero dist\n",
-              ddg_info->alias_fail_no_tree, ddg_info->alias_fail_no_drf,
-              ddg_info->alias_fail_no_ddr, ddg_info->alias_fail_useless_ddr,
-              ddg_info->alias_fail_graceful, ddg_info->alias_success_useless,
-              ddg_info->alias_success_new, ddg_info->alias_success_no_dep,
-              ddg_info->alias_success_nonzero_dist);
-   
-   ddg_info->alias_fail_no_tree = 0;
-   ddg_info->alias_fail_no_drf = 0;
-   ddg_info->alias_fail_no_ddr = 0;
-   ddg_info->alias_fail_useless_ddr = 0;
-   ddg_info->alias_fail_graceful = 0;
-   ddg_info->alias_success_useless = 0;
-   ddg_info->alias_success_new = 0;
-   ddg_info->alias_success_no_dep = 0;
-   ddg_info->alias_success_nonzero_dist = 0;
- }
- 
  /* A callback for for_each_rtx to remove exported data for mems.  */
  static int
  walk_mems (rtx *x, void *data ATTRIBUTE_UNUSED)
--- 578,583 ----
*************** ddg_export_may_alias_p (tree t1, tree t2
*** 780,785 ****
--- 635,643 ----
    data_reference_p drf1, drf2;
    ddr_p ddr;
  
+   if (! dbg_cnt (ddg_export))
+     return true;
+ 
    if (!ddg_info || !t1 || !t2)
      return true;
  
*************** ddg_export_may_alias_p (tree t1, tree t2
*** 793,810 ****
      return true;
  
    if (DDR_ARE_DEPENDENT (ddr) == chrec_known)
!     return false;
    
    if (DDR_ARE_DEPENDENT (ddr) == NULL_TREE 
        && DDR_NUM_DIST_VECTS (ddr) > 0
        && ! for_pipelining
        && ! ddg_info->pipelining_completed
        && nonzero_dist_vects (DDR_DIST_VECTS (ddr), DDR_NB_LOOPS (ddr)))
!     return false;
    
    return true;
  }
  
  static bool
  gate_ddg_export (void)
  {
--- 651,694 ----
      return true;
  
    if (DDR_ARE_DEPENDENT (ddr) == chrec_known)
!     {
!       ddg_export_disambiguations++;
!       return false;
!     }
    
    if (DDR_ARE_DEPENDENT (ddr) == NULL_TREE 
        && DDR_NUM_DIST_VECTS (ddr) > 0
        && ! for_pipelining
        && ! ddg_info->pipelining_completed
        && nonzero_dist_vects (DDR_DIST_VECTS (ddr), DDR_NB_LOOPS (ddr)))
!     {
!       ddg_export_disambiguations++;
!       return false;
!     }
    
    return true;
  }
  
+ /* Free ddg export info.  */
+ void
+ free_ddg_export_info (void)
+ {
+   if (!ddg_info)
+     return;
+ 
+   statistics_counter_event (cfun, "DDG export disambiguations", 
+                             ddg_export_disambiguations);
+   ddg_export_disambiguations = 0;
+ 
+   /* TODO: DDR_LOOP_NESTs are not free'd.  */
+   htab_delete (ddg_info->datarefs_pair_to_ddr);
+   htab_delete (ddg_info->tree_to_dataref);
+ 
+   free (ddg_info);
+   ddg_info = NULL;
+ }
+ 
+ /* Gate for ddg export pass.  */
  static bool
  gate_ddg_export (void)
  {
*************** struct gimple_opt_pass pass_gather_ddg_i
*** 830,848 ****
   }
  };
  
- /* Free ddg export info.  */
- void
- free_ddg_export_info (void)
- {
-   if (!ddg_info)
-     return;
- 
-   /* TODO: DDR_LOOP_NESTs are not free'd.  */
-   htab_delete (ddg_info->datarefs_pair_to_ddr);
-   htab_delete (ddg_info->tree_to_dataref);
- 
-   free (ddg_info);
-   ddg_info = NULL;
- }
  
  
--- 714,718 ----
Index: gcc/rtl.h
===================================================================
*** gcc/rtl.h	(revision 147239)
--- gcc/rtl.h	(revision 147240)
*************** extern void simplify_using_condition (rt
*** 2342,2349 ****
  /* In final.c  */
  extern unsigned int compute_alignments (void);
  
- extern void alias_export_finish_once (void);
- 
  
  struct rtl_hooks
  {
--- 2342,2347 ----
Index: gcc/Makefile.in
===================================================================
*** gcc/Makefile.in	(revision 147239)
--- gcc/Makefile.in	(revision 147240)
*************** alias-export.o : alias-export.c alias-ex
*** 2065,2072 ****
     $(FUNCTION_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(GGC_H) output.h $(TREE_FLOW_H) \
     $(RTL_H) $(TREE_PASS_H) $(FLAGS_H) tree-ssa-alias.h vec.h bitmap.h \
     pointer-set.h dbgcnt.h $(CFGLOOP_H) tree-data-ref.h tree-scalar-evolution.h \
!    $(DIAGNOSTIC_H)  
! 
  
  langhooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
     $(TREE_H) $(TOPLEV_H) $(TREE_INLINE_H) $(RTL_H) insn-config.h $(INTEGRATE_H) \
--- 2065,2071 ----
     $(FUNCTION_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(GGC_H) output.h $(TREE_FLOW_H) \
     $(RTL_H) $(TREE_PASS_H) $(FLAGS_H) tree-ssa-alias.h vec.h bitmap.h \
     pointer-set.h dbgcnt.h $(CFGLOOP_H) tree-data-ref.h tree-scalar-evolution.h \
!    $(DIAGNOSTIC_H) statistics.h
  
  langhooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
     $(TREE_H) $(TOPLEV_H) $(TREE_INLINE_H) $(RTL_H) insn-config.h $(INTEGRATE_H) \
Index: gcc/statistics.c
===================================================================
*** gcc/statistics.c	(revision 147239)
--- gcc/statistics.c	(revision 147240)
*************** hash_statistics_free (void *p)
*** 82,88 ****
  static htab_t
  curr_statistics_hash (void)
  {
!   unsigned idx = current_pass->static_pass_number;
  
    if (idx < nr_statistics_hashes
        && statistics_hashes[idx] != NULL)
--- 82,91 ----
  static htab_t
  curr_statistics_hash (void)
  {
!   unsigned idx;
! 
!   gcc_assert (current_pass->static_pass_number >= 0);
!   idx = current_pass->static_pass_number;
  
    if (idx < nr_statistics_hashes
        && statistics_hashes[idx] != NULL)
*************** statistics_counter_event (struct functio
*** 294,302 ****
        || incr == 0)
      return;
  
!   counter = lookup_or_add_counter (curr_statistics_hash (), id, 0, false);
!   gcc_assert (!counter->histogram_p);
!   counter->count += incr;
  
    if (!statistics_dump_file
        || !(statistics_dump_flags & TDF_DETAILS))
--- 297,308 ----
        || incr == 0)
      return;
  
!   if (current_pass->static_pass_number != -1)
!     {
!       counter = lookup_or_add_counter (curr_statistics_hash (), id, 0, false);
!       gcc_assert (!counter->histogram_p);
!       counter->count += incr;
!     }
  
    if (!statistics_dump_file
        || !(statistics_dump_flags & TDF_DETAILS))

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