This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] What does bsi_next_in_bb do?


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]