This is the mail archive of the 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]

[autovect][patch] Share loop version between tree-cfg and cfglayout.

The following patch is the first step to implement the loop version in
cfg-layout mode.  This is required to move SMS to work in cfg-layout
mode.  It's the first patch of several that improve SMS and make it
applicable to more loops.

Since the patch has wide changes and moves functions between several
files I will wait for your comment before committing it.

The patch passed bootstrap with -funswitch-loops and didn't produce
any new regressions on apple-ppc-darwin target.

2005-01-09 Mostafa Hagog <>

      * basic-block.h (extract_true_false_edges_from_block): Declare.
      * cfg.c (extract_true_false_edges_from_block): Move to here.
      * cfghooks.c (lv_flush_pending_stmts, loop_version_call_back):
      * cfghooks.h (loop_version_call_back, flush_pending_stmts): New
      in cfg_hooks.
      (lv_flush_pending_stmts, loop_version_call_back): Declare.
      * cfgloop.h (create_preheader): Make extern.
      (duplicate_loop_to_header_edge): Change return type to bool.
      (loop_version): Declare.
      * cfgloopmanip.c (cfghooks.h): Include.
      (duplicate_loop_to_header_edge): Change return type to bool.
      (create_preheader): Make external.
      (loop_version): Move here.
      * cfgrtl.c (cfgloop.h): Include.
      (rtl_verify_flow_info_1): Fix.
      (rtl_lv_add_condition_to_bb, rtl_lv_adjust_loop_entry_edge,
      rtl_loop_version_call_back): New.
      (rtl_cfg_hooks, cfg_layout_rtl_cfg_hook): Add two new hooks.
      * tree-cfg.c (lv_adjust_loop_header_phi,
      tree_lv_add_condition_to_bb, tree_lv_adjust_loop_entry_edge):
      Move here and rename.
      (tree_loop_version_call_back): New.
      (tree_cfg_hooks): Add two new hooks.
      (extract_true_false_edges_from_block): Remove from here.
      * tree-flow.h (extract_true_false_edges_from_block): Remove from
      * tree-ssa-loop-manip.c (lv_adjust_loop_header_phi,
      lv_adjust_loop_entry_edge, tree_ssa_loop_version): Remove from

(See attached file: loop_version_hook3.cfg)

Attachment: loop_version_hook3.cfg
Description: Binary data

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