[PATCH][TUPLES] Two simple bug fixes.
Diego Novillo
dnovillo@google.com
Mon Apr 14 11:59:00 GMT 2008
On Sun, Apr 13, 2008 at 05:04, Richard Guenther
<richard.guenther@gmail.com> wrote:
> Can we put an assert guarded by #if ENABLE_CHECKING for the case you ran
> into in gsi_last? I also hit similar issues if you split a bb when
> there are active
> tsis in that bb (they get invalid bbs and strange things occur).
We can't really assert anything in gsi_last. gsi_last_bb(bb) is
not semantically equivalent to gsi_last(bb_seq(bb)).
In gsi_last() a NULL sequence will simply return an iterator to
a NULL statement and associated to no basic block. We cannot
really abort because there are sequences that are created and
manipulated before they are associated to a basic block.
OTOH, gsi_last_bb() will return an iterator to a NULL statement,
but associated to the basic block requested in the argument.
That's what makes it useful for empty blocks.
Doug, could you add a note explaining this difference in
gsi_last()/gsi_first()?
Thanks. Diego.
More information about the Gcc-patches
mailing list