This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Basic block infrastructure after dbr pass
Boris Boesler wrote:
I haven't specified my problem properly? If I traverse basic blocks via
FOR_EACH_BB (used in compute_bb_for_insn, too) I get insns which are not
in the insn-stream for(insn = get_insns(), insn; insn = NEXT_INSN(insn)) ..
As Ian mentioned, the delay-slot filling pass does not update the CFG.
So you can't use it after this pass, at least for any target that has
delay slots.
As I mentioned, the machine dependent reorg passes are the very first
passes that are run after the last pass that updates the CFG. Hence,
the CFG is still valid when machine dependent reorg runs, and it can
still be used there if you are careful.
You really need to look at the order of passes defined in passes.c,
particularly the pass_free_cfg I pointed you at earlier. The CFG is
always valid before this point. The CFG is not valid after this point,
if you run any optimization pass that moves instructions around, which
includes most all of them that run after this point. None of these
passes try to maintain the CFG info. md_reorg is a special case because
it is the first one run after we stop maintaining the CFG, so the
residual info is still usable if you are careful.
Jim