This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] What does bsi_next_in_bb do?
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>
- Date: 16 Jul 2003 15:29:32 -0400
- Subject: Re: [tree-ssa] What does bsi_next_in_bb do?
- References: <1058382982.2838.7.camel@steven.lr-s.tudelft.nl>
On Wed, 2003-07-16 at 15:16, Steven Bosscher wrote:
> The comment says:
>
> /* Similar to tsi_step() but stops at basic block boundaries and ignores
> empty statement nodes inside a basic block. */
>
> But tsi_step() does not exist...
>
The comment is out of date. Thats been renamed to tsi_next().
bsi_next_in_bb is a local static function, and is primarily for use by
the various bsi_* routines.
bsi_next() gets the next stmt in the block. It picks the block up by
calling bb_for_stmt() on the current stmt. Within the bsi_routines, we
already know the block, so we avoid the lookup by calling
bsi_next_in_bb(). (Look at the code for bsi_next(), there are only 2
stmts...)
basic_block bb = bb_for_stmt (*(i->tp));
bsi_next_in_bb (i, bb);
Andrew