aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2003-02-21 23:14:23 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2003-02-21 22:14:23 +0000
commit9809a3624d899076cd7b3f756941ffba81dee7d8 (patch)
tree783112e221f5003735edc015c9910f43ecb7852d /gcc
parent19df1edfbe0c64fb1664d65a418fb757de9fb53c (diff)
downloadgcc-9809a3624d899076cd7b3f756941ffba81dee7d8.zip
gcc-9809a3624d899076cd7b3f756941ffba81dee7d8.tar.gz
gcc-9809a3624d899076cd7b3f756941ffba81dee7d8.tar.bz2
cfgrtl.c (commit_edge_insertions): Call find_many_sub_basic_block only when some code has been emitted.
* cfgrtl.c (commit_edge_insertions): Call find_many_sub_basic_block only when some code has been emitted. (commit_edge_insertions_watch_calls): Bring into sync with commit_edge_insertions From-SVN: r63248
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/cfgrtl.c34
2 files changed, 39 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a0cc8be..cc10d78 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+Fri Feb 21 23:10:13 CET 2003 Jan Hubicka <jh@suse.cz>
+
+ * cfgrtl.c (commit_edge_insertions): Call
+ find_many_sub_basic_block only when some code has been emitted.
+ (commit_edge_insertions_watch_calls): Bring into sync with
+ commit_edge_insertions
+
Fri Feb 21 20:41:29 2003 J"orn Rennecke <joern.rennecke@superh.com>
* sh.h (OVERRIDE_OPTIONS): Fix code that clears 'e' register class.
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 6d3be7e..77290a9 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -1460,6 +1460,7 @@ commit_edge_insertions ()
{
basic_block bb;
sbitmap blocks;
+ bool changed = false;
#ifdef ENABLE_CHECKING
verify_flow_info ();
@@ -1473,10 +1474,16 @@ commit_edge_insertions ()
{
next = e->succ_next;
if (e->insns)
- commit_one_edge_insertion (e, false);
+ {
+ changed = true;
+ commit_one_edge_insertion (e, false);
+ }
}
}
+ if (!changed)
+ return;
+
blocks = sbitmap_alloc (last_basic_block);
sbitmap_zero (blocks);
FOR_EACH_BB (bb)
@@ -1500,6 +1507,8 @@ void
commit_edge_insertions_watch_calls ()
{
basic_block bb;
+ sbitmap blocks;
+ bool changed = false;
#ifdef ENABLE_CHECKING
verify_flow_info ();
@@ -1513,9 +1522,30 @@ commit_edge_insertions_watch_calls ()
{
next = e->succ_next;
if (e->insns)
- commit_one_edge_insertion (e, true);
+ {
+ changed = true;
+ commit_one_edge_insertion (e, true);
+ }
}
}
+
+ if (!changed)
+ return;
+
+ blocks = sbitmap_alloc (last_basic_block);
+ sbitmap_zero (blocks);
+ FOR_EACH_BB (bb)
+ if (bb->aux)
+ {
+ SET_BIT (blocks, bb->index);
+ /* Check for forgotten bb->aux values before commit_edge_insertions
+ call. */
+ if (bb->aux != &bb->aux)
+ abort ();
+ bb->aux = NULL;
+ }
+ find_many_sub_basic_blocks (blocks);
+ sbitmap_free (blocks);
}
/* Print out one basic block with live information at start and end. */