diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2007-03-12 19:38:06 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2007-03-12 19:38:06 +0000 |
commit | dacb3cda3208dca940e007cc6b9d259bdede193b (patch) | |
tree | 15607dc253aed0b6bf688c4fe381a3d1c758d403 /gcc/cfglayout.c | |
parent | 6da4bc4e6ed62eabf3a97e58d05d94820543d9b7 (diff) | |
download | gcc-dacb3cda3208dca940e007cc6b9d259bdede193b.zip gcc-dacb3cda3208dca940e007cc6b9d259bdede193b.tar.gz gcc-dacb3cda3208dca940e007cc6b9d259bdede193b.tar.bz2 |
tree-pass.h (pass_into_cfg_layout_mode, [...]): Declare.
* tree-pass.h (pass_into_cfg_layout_mode,
pass_outof_cfg_layout_mode): Declare.
* cfglayout.c (into_cfg_layout_mode, outof_cfg_layout_mode,
pass_into_cfg_layout_mode, pass_outof_cfg_layout_mode): New.
* passes.c (pass_into_cfg_layout_mode): Schedule before jump2.
(pass_outof_cfg_layout_mode): Schedule after pass_rtl_ifcvt.
From-SVN: r122858
Diffstat (limited to 'gcc/cfglayout.c')
-rw-r--r-- | gcc/cfglayout.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c index bbdd7a2..545cc5d 100644 --- a/gcc/cfglayout.c +++ b/gcc/cfglayout.c @@ -347,6 +347,60 @@ struct tree_opt_pass pass_insn_locators_initialize = 0 /* letter */ }; +static unsigned int +into_cfg_layout_mode (void) +{ + cfg_layout_initialize (0); + return 0; +} + +static unsigned int +outof_cfg_layout_mode (void) +{ + basic_block bb; + + FOR_EACH_BB (bb) + if (bb->next_bb != EXIT_BLOCK_PTR) + bb->aux = bb->next_bb; + + cfg_layout_finalize (); + + return 0; +} + +struct tree_opt_pass pass_into_cfg_layout_mode = +{ + "into_cfglayout", /* name */ + NULL, /* gate */ + into_cfg_layout_mode, /* execute */ + NULL, /* sub */ + NULL, /* next */ + 0, /* static_pass_number */ + 0, /* tv_id */ + 0, /* properties_required */ + 0, /* properties_provided */ + 0, /* properties_destroyed */ + 0, /* todo_flags_start */ + TODO_dump_func, /* todo_flags_finish */ + 0 /* letter */ +}; + +struct tree_opt_pass pass_outof_cfg_layout_mode = +{ + "outof_cfglayout", /* name */ + NULL, /* gate */ + outof_cfg_layout_mode, /* execute */ + NULL, /* sub */ + NULL, /* next */ + 0, /* static_pass_number */ + 0, /* tv_id */ + 0, /* properties_required */ + 0, /* properties_provided */ + 0, /* properties_destroyed */ + 0, /* todo_flags_start */ + TODO_dump_func, /* todo_flags_finish */ + 0 /* letter */ +}; /* For each lexical block, set BLOCK_NUMBER to the depth at which it is found in the block tree. */ |