diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-11 20:29:10 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-11 20:29:10 +0000 |
commit | 259c0e4464e413838d067165bc12e3ceca23c112 (patch) | |
tree | 179c0e30f56deacb4321b27a2f422431e26876a2 /gcc/cfgloop.c | |
parent | 000edd14506323662e42547a08580d312ca060e8 (diff) | |
download | gcc-259c0e4464e413838d067165bc12e3ceca23c112.tar.gz |
Add loop_exits_from_bb_p.
2010-07-20 Vladimir Kargov <kargov@gmail.com>
Sebastian Pop <sebastian.pop@amd.com>
* cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
(loop_exits_from_bb_p): New.
* cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
(loop_exits_from_bb_p): Declared.
* graphite-scop-detection.c (scopdet_basic_block_info): Call
loop_exits_to_bb_p.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163153 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloop.c')
-rw-r--r-- | gcc/cfgloop.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c index 24f0ebc792e..d11456366e6 100644 --- a/gcc/cfgloop.c +++ b/gcc/cfgloop.c @@ -1620,10 +1620,10 @@ single_exit (const struct loop *loop) return NULL; } -/* Returns true when BB has an edge exiting LOOP. */ +/* Returns true when BB has an incoming edge exiting LOOP. */ bool -is_loop_exit (struct loop *loop, basic_block bb) +loop_exits_to_bb_p (struct loop *loop, basic_block bb) { edge e; edge_iterator ei; @@ -1634,3 +1634,18 @@ is_loop_exit (struct loop *loop, basic_block bb) return false; } + +/* Returns true when BB has an outgoing edge exiting LOOP. */ + +bool +loop_exits_from_bb_p (struct loop *loop, basic_block bb) +{ + edge e; + edge_iterator ei; + + FOR_EACH_EDGE (e, ei, bb->succs) + if (loop_exit_edge_p (loop, e)) + return true; + + return false; +} |