This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
outdated comment in sched-rgn.c or bug in find_basic_blocks ?
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 18 Dec 2002 15:32:21 +0000
- Subject: outdated comment in sched-rgn.c or bug in find_basic_blocks ?
- Organization: SuperH UK Ltd.
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.
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.
--
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658