[tree-ssa]: PRE updates and note on bug
Daniel Berlin
dberlin@dberlin.org
Tue Jul 22 22:33:00 GMT 2003
>
>>
>> I was getting an empty stmt for end of bb using last_stmt and
>> last_stmt_ptr, but if i replace it with:
>>
>> {
>> block_stmt_iterator bsi2;
>> block_stmt_iterator bsi3;
>> for (bsi2 = bsi3 = bsi_start (bb);
>> !bsi_end_p (bsi2);
>> bsi_next (&bsi2))
>> bsi3 = bsi2;
>> endtree = bsi_stmt (bsi3);
>> endtreep = bsi_stmt_ptr (bsi3);
>> }
>>
>> (which is the code that bsi_last falls back on), it works fine and
>> gives the correct statement.
>
>
> last_stmt and last_stmt_ptr will do that, but bsi_last() should give
> you
> the correct thing.
>
Errr, that would be strange, since:
tree
last_stmt (basic_block bb)
{
block_stmt_iterator b;
b = bsi_last (bb);
return (!bsi_end_p (b)) ? bsi_stmt (b) : NULL_TREE;
}
last_stmt will only return an empty_stmt iff bsi_last does.
> Andrew
>
More information about the Gcc-patches
mailing list