summaryrefslogtreecommitdiff
path: root/gcc/cfghooks.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-24 07:56:56 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-24 07:56:56 +0000
commitc4d867e016d15d83fd56246c31074f7694cbf9e8 (patch)
treebc85c149f3a2ee968ec2f35b28ea170572c7b44d /gcc/cfghooks.c
parent4e3592306d71b0147b62484ac5fa202aede63fb8 (diff)
downloadgcc-c4d867e016d15d83fd56246c31074f7694cbf9e8.tar.gz
* bb-reorder.c (copy_bb, duplicate_computed_gotos): Add argument
to duplicate_block. * cfghooks.c (duplicate_block): Added position where to place new block as argument. * cfghooks.h (duplicate_block): Declaration changed. * cfglayout.c (copy_bbs): Add argument after. Pass it to duplicate_block. * cfglayout.h (copy_bbs): Declaration changed. * cfgloop.h (loop_version): Declaration changed. * cfgloopmanip.c (duplicate_loop_to_header_edge): Pass position to copy_bbs. (loop_version): Pass position to duplicate_loop_to_header_edge. Add place_after argument and position new blocks according to it. * modulo-sched.c (sms_schedule): Pass place_after argument to loop_version. * tracer.c (tail_duplicate): Pass argument to duplicate_block. * tree-cfg.c (split_edge_bb_loc): New function. (tree_split_edge, tree_duplicate_sese_region): Use split_edge_bb_loc to determine position of new blocks. * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Pass argument to loop_version. * tree-ssa-threadupdate.c (create_block_for_threading): Pass argument to duplicate_block. * tree-vectorizer.c (slpeel_tree_duplicate_loop_to_edge_cfg): Pass position to copy_bbs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103437 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfghooks.c')
-rw-r--r--gcc/cfghooks.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c
index bc296d43e0b..138bc4ab2ae 100644
--- a/gcc/cfghooks.c
+++ b/gcc/cfghooks.c
@@ -691,10 +691,11 @@ can_duplicate_block_p (basic_block bb)
}
/* Duplicates basic block BB and redirects edge E to it. Returns the
- new basic block. */
+ new basic block. The new basic block is placed after the basic block
+ AFTER. */
basic_block
-duplicate_block (basic_block bb, edge e)
+duplicate_block (basic_block bb, edge e, basic_block after)
{
edge s, n;
basic_block new_bb;
@@ -713,6 +714,8 @@ duplicate_block (basic_block bb, edge e)
#endif
new_bb = cfg_hooks->duplicate_block (bb);
+ if (after)
+ move_block_after (new_bb, after);
new_bb->loop_depth = bb->loop_depth;
new_bb->flags = bb->flags;