This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: outdated comment in sched-rgn.c or bug in find_basic_blocks ?
- From: Jan Hubicka <jh at suse dot cz>
- To: Joern Rennecke <joern dot rennecke at superh dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 19 Dec 2002 10:46:30 +0100
- Subject: Re: outdated comment in sched-rgn.c or bug in find_basic_blocks ?
- References: <3E009505.F9151352@superh.com>
> In sched-rgn.c there is a comment:
> /* The scheduler runs after flow; therefore, we can't blindly call
> back into find_basic_blocks since doing so could invalidate the
> info in global_live_at_start.
>
> Consider a block consisting entirely of dead stores; after life
> analysis it would be a block of NOTE_INSN_DELETED notes. If
> we call find_basic_blocks again, then the block would be removed
> entirely and invalidate our the register live information.
This is also not very menaningful. We have cleanup_cfg for that that
does know how to update the CFG.
>
> We could (should?) recompute register live information. Doing
> so may even be beneficial. */
>
> This makes you think that calling find_basic_blocks would be OK if you recomputed
> the register live information afterwards.
>
> However, we can't call find_basic_blocks after estimate_probabilities, as
> find_basic_blocks first calls clear_edges to clear all the previous basic
> block info - including branch predictions - and after building the basic blocks
> anew, calls verify_flow_info. The reg notes created by estimate_probabilities
> remain, and verify_flow_info then complains about an inconsistency with the
> cfg, which has all probabilities still zeroed.
Yes, this is correct. We should not rebuilt the CFG now after the loop
optimizer (that should get updated, we are working on it).
Can you please update the comment?
Honza
>
> --
> --------------------------
> SuperH (UK) Ltd.
> 2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
> T:+44 1454 465658