https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116899

--- Comment #4 from Andrew Macleod <amacleod at redhat dot com> ---
(In reply to Jakub Jelinek from comment #3)
> Similarly to the other BB, enable_ranger -> gimple_ranger -> ranger_cache
> does
> 1000    m_workback.create (0);
> 1001    m_workback.safe_grow_cleared (last_basic_block_for_fn (cfun));
> 1002    m_workback.truncate (0);
> (which seems just weird, I'd expect m_workback.create
> (last_basic_block_for_fn (cfun));
> Creating a large vector, filling it with zeros and then immediately
> truncating is just a waste of time) and then just uses
> m_workback.quick_push.  That works only if no new basic blocks are created,
> which the gimple-lower-bitint creates a lot (split_block in tons of places,
> even manual create_basic_block).

with the truncate, clearly no need for the safe growing.   I think my use of
the
   create (0); safe_grow(size);
idiom dates back to a problem I once had (years ago) where "create (size)"
caused me a failure down the road that was hard to debug.. and it was fixed by
the ceate (0)  safe_grow(size) seqeuence.  , so I ended up just always doing it
that way :-P

I especially see no need for that safe_grow_cleared call in this case

Reply via email to