aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2005-03-07 13:56:00 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2005-03-07 13:56:00 +0000
commit12eff7b7bf15d868ca68ece6613d5c17ebc0c69d (patch)
tree40318d554a154beb13c6f80bd5976fb6400a0d62
parent6db31844ad5b459e9f5ad0e306676bba01ea589b (diff)
downloadgcc-12eff7b7bf15d868ca68ece6613d5c17ebc0c69d.zip
gcc-12eff7b7bf15d868ca68ece6613d5c17ebc0c69d.tar.gz
gcc-12eff7b7bf15d868ca68ece6613d5c17ebc0c69d.tar.bz2
cfgbuild.c (find_sub_basic_blocks): Remove.
* cfgbuild.c (find_sub_basic_blocks): Remove. * basic-block.h: Remove the corresponding prototype. * cfgexpand.c, cfgrtl.c: Don't mention find_sub_basic_blocks in comments. * doc/cfg.texi: Don't mention find_sub_basic_blocks. From-SVN: r96016
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/basic-block.h1
-rw-r--r--gcc/cfgbuild.c44
-rw-r--r--gcc/cfgexpand.c4
-rw-r--r--gcc/cfgrtl.c2
-rw-r--r--gcc/doc/cfg.texi6
6 files changed, 13 insertions, 50 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 492366e..ac0a30a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -16,6 +16,12 @@
* recog.c (verify_changes): Make it static.
* recog.h: Remove the corresponding prototype.
+ * cfgbuild.c (find_sub_basic_blocks): Remove.
+ * basic-block.h: Remove the corresponding prototype.
+ * cfgexpand.c, cfgrtl.c: Don't mention find_sub_basic_blocks
+ in comments.
+ * doc/cfg.texi: Don't mention find_sub_basic_blocks.
+
2005-03-07 David Billinghurst <David.Billinghurst@riotinto.com>
* config/i386/cygwin1.c(mingw_scan): Use xstrdup in calls to putenv.
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index fb69f35..7865058 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -764,7 +764,6 @@ extern rtx block_label (basic_block);
extern bool forwarder_block_p (basic_block);
extern bool purge_all_dead_edges (int);
extern bool purge_dead_edges (basic_block);
-extern void find_sub_basic_blocks (basic_block);
extern void find_many_sub_basic_blocks (sbitmap);
extern void rtl_make_eh_edge (sbitmap *, basic_block, rtx);
extern bool can_fallthru (basic_block, basic_block);
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c
index ac8a941..0c0e9eb 100644
--- a/gcc/cfgbuild.c
+++ b/gcc/cfgbuild.c
@@ -28,9 +28,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
Available functionality:
- CFG construction
- find_basic_blocks
- - Local CFG construction
- find_sub_basic_blocks */
+ find_basic_blocks */
#include "config.h"
#include "system.h"
@@ -537,7 +535,7 @@ find_basic_blocks (rtx f)
timevar_pop (TV_CFG);
}
-/* State of basic block as seen by find_sub_basic_blocks. */
+/* State of basic block as seen by find_many_sub_basic_blocks. */
enum state {BLOCK_NEW = 0, BLOCK_ORIGINAL, BLOCK_TO_SPLIT};
#define STATE(BB) (enum state) ((size_t) (BB)->aux)
@@ -771,41 +769,3 @@ find_many_sub_basic_blocks (sbitmap blocks)
FOR_EACH_BB (bb)
SET_STATE (bb, 0);
}
-
-/* Like above but for single basic block only. */
-
-void
-find_sub_basic_blocks (basic_block bb)
-{
- basic_block min, max, b;
- basic_block next = bb->next_bb;
-
- min = bb;
- find_bb_boundaries (bb);
- max = next->prev_bb;
-
- /* Now re-scan and wire in all edges. This expect simple (conditional)
- jumps at the end of each new basic blocks. */
- make_edges (min, max, 1);
-
- /* Update branch probabilities. Expect only (un)conditional jumps
- to be created with only the forward edges. */
- FOR_BB_BETWEEN (b, min, max->next_bb, next_bb)
- {
- edge e;
- edge_iterator ei;
-
- if (b != min)
- {
- b->count = 0;
- b->frequency = 0;
- FOR_EACH_EDGE (e, ei, b->preds)
- {
- b->count += e->count;
- b->frequency += EDGE_FREQUENCY (e);
- }
- }
-
- compute_outgoing_frequencies (b);
- }
-}
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index ce26661..e339505 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -1003,7 +1003,7 @@ expand_gimple_tailcall (basic_block bb, tree stmt, bool *can_fallthru)
/* This is somewhat ugly: the call_expr expander often emits instructions
after the sibcall (to perform the function return). These confuse the
- find_sub_basic_blocks code, so we need to get rid of these. */
+ find_many_sub_basic_blocks code, so we need to get rid of these. */
last = NEXT_INSN (last);
gcc_assert (BARRIER_P (last));
@@ -1088,7 +1088,7 @@ expand_gimple_basic_block (basic_block bb, FILE * dump_file)
e->flags &= ~EDGE_EXECUTABLE;
/* At the moment not all abnormal edges match the RTL representation.
- It is safe to remove them here as find_sub_basic_blocks will
+ It is safe to remove them here as find_many_sub_basic_blocks will
rediscover them. In the future we should get this fixed properly. */
if (e->flags & EDGE_ABNORMAL)
remove_edge (e);
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 1b4eb45..c0d17be 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -1684,7 +1684,7 @@ commit_one_edge_insertion (edge e, int watch_calls)
else
gcc_assert (!JUMP_P (last));
- /* Mark the basic block for find_sub_basic_blocks. */
+ /* Mark the basic block for find_many_sub_basic_blocks. */
bb->aux = &bb->aux;
}
diff --git a/gcc/doc/cfg.texi b/gcc/doc/cfg.texi
index e25e116..9203302 100644
--- a/gcc/doc/cfg.texi
+++ b/gcc/doc/cfg.texi
@@ -580,14 +580,12 @@ low level functions, such as @code{redirect_jump} that operate on RTL
chain only. The CFG hooks defined in @file{cfghooks.h} should provide
the complete API required for manipulating and maintaining the CFG@.
-@findex find_sub_basic_blocks, split_block
+@findex split_block
It is also possible that a pass has to insert control flow instruction
into the middle of a basic block, thus creating an entry point in the
middle of the basic block, which is impossible by definition: The
block must be split to make sure it only has one entry point, i.e.@: the
-head of the basic block. In the RTL representation, the
-@code{find_sub_basic_blocks} may be used to split existing basic block
-and add necessary edges. The CFG hook @code{split_block} may be used
+head of the basic block. The CFG hook @code{split_block} may be used
when an instruction in the middle of a basic block has to become the
target of a jump or branch instruction.