OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [tree-sra.c] - Diff between revs 280 and 378

Show entire file | Details | Blame | View Log

Rev 280 Rev 378
Line 274... Line 274...
 
 
/* Set by scan_function when it finds a recursive call with less actual
/* Set by scan_function when it finds a recursive call with less actual
   arguments than formal parameters..  */
   arguments than formal parameters..  */
static bool encountered_unchangable_recursive_call;
static bool encountered_unchangable_recursive_call;
 
 
 
/* Set by scan_function when it changes the control flow graph.  */
 
static bool cfg_changed;
 
 
/* This is a table in which for each basic block and parameter there is a
/* This is a table in which for each basic block and parameter there is a
   distance (offset + size) in that parameter which is dereferenced and
   distance (offset + size) in that parameter which is dereferenced and
   accessed in that BB.  */
   accessed in that BB.  */
static HOST_WIDE_INT *bb_dereferences;
static HOST_WIDE_INT *bb_dereferences;
/* Bitmap of BBs that can cause the function to "stop" progressing by
/* Bitmap of BBs that can cause the function to "stop" progressing by
Line 568... Line 571...
  link_pool = create_alloc_pool ("SRA links", sizeof (struct assign_link), 16);
  link_pool = create_alloc_pool ("SRA links", sizeof (struct assign_link), 16);
  base_access_vec = pointer_map_create ();
  base_access_vec = pointer_map_create ();
  memset (&sra_stats, 0, sizeof (sra_stats));
  memset (&sra_stats, 0, sizeof (sra_stats));
  encountered_apply_args = false;
  encountered_apply_args = false;
  encountered_unchangable_recursive_call = false;
  encountered_unchangable_recursive_call = false;
 
  cfg_changed = false;
}
}
 
 
/* Hook fed to pointer_map_traverse, deallocate stored vectors.  */
/* Hook fed to pointer_map_traverse, deallocate stored vectors.  */
 
 
static bool
static bool
Line 1112... Line 1116...
  tree *t;
  tree *t;
  bool ret = false;
  bool ret = false;
 
 
  FOR_EACH_BB (bb)
  FOR_EACH_BB (bb)
    {
    {
      bool bb_changed = false;
 
 
 
      if (handle_ssa_defs)
      if (handle_ssa_defs)
        for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
        for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
          ret |= handle_ssa_defs (gsi_stmt (gsi), data);
          ret |= handle_ssa_defs (gsi_stmt (gsi), data);
 
 
      gsi = gsi_start_bb (bb);
      gsi = gsi_start_bb (bb);
Line 1218... Line 1220...
            {
            {
              ret = true;
              ret = true;
 
 
              if (!analysis_stage)
              if (!analysis_stage)
                {
                {
                  bb_changed = true;
 
                  update_stmt (stmt);
                  update_stmt (stmt);
                  maybe_clean_eh_stmt (stmt);
                  if (maybe_clean_eh_stmt (stmt)
 
                      && gimple_purge_dead_eh_edges (bb))
 
                    cfg_changed = true;
                }
                }
            }
            }
          if (deleted)
          if (!deleted)
            bb_changed = true;
 
          else
 
            {
 
              gsi_next (&gsi);
              gsi_next (&gsi);
              ret = true;
 
            }
 
        }
        }
      if (!analysis_stage && bb_changed && sra_mode == SRA_MODE_EARLY_IPA)
 
        gimple_purge_dead_eh_edges (bb);
 
    }
    }
 
 
  return ret;
  return ret;
}
}
 
 
Line 2869... Line 2865...
                            sra_stats.subreplacements);
                            sra_stats.subreplacements);
  statistics_counter_event (cfun, "Deleted stmts", sra_stats.deleted);
  statistics_counter_event (cfun, "Deleted stmts", sra_stats.deleted);
  statistics_counter_event (cfun, "Separate LHS and RHS handling",
  statistics_counter_event (cfun, "Separate LHS and RHS handling",
                            sra_stats.separate_lhs_rhs_handling);
                            sra_stats.separate_lhs_rhs_handling);
 
 
 
  if (cfg_changed)
 
    ret = TODO_update_ssa | TODO_cleanup_cfg;
 
  else
  ret = TODO_update_ssa;
  ret = TODO_update_ssa;
 
 
 out:
 out:
  sra_deinitialize ();
  sra_deinitialize ();
  return ret;
  return ret;
Line 4234... Line 4233...
  if (dump_file)
  if (dump_file)
    ipa_dump_param_adjustments (dump_file, adjustments, current_function_decl);
    ipa_dump_param_adjustments (dump_file, adjustments, current_function_decl);
 
 
  modify_function (node, adjustments);
  modify_function (node, adjustments);
  VEC_free (ipa_parm_adjustment_t, heap, adjustments);
  VEC_free (ipa_parm_adjustment_t, heap, adjustments);
 
  if (cfg_changed)
 
    ret = TODO_update_ssa | TODO_cleanup_cfg;
 
  else
  ret = TODO_update_ssa;
  ret = TODO_update_ssa;
 
 
  statistics_counter_event (cfun, "Unused parameters deleted",
  statistics_counter_event (cfun, "Unused parameters deleted",
                            sra_stats.deleted_unused_parameters);
                            sra_stats.deleted_unused_parameters);
  statistics_counter_event (cfun, "Scalar parameters converted to by-value",
  statistics_counter_event (cfun, "Scalar parameters converted to by-value",

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.