This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Code Motion after Machine Dependent Reorganization??


"Balaji V. Iyer" <bviyer@ncsu.edu> writes:

> I printed out the RTL dump using the following code during the machine
> dependent reorganization
>
>
> FOR_EACH_BB(bb) {
>     for (insn = bb_head(bb); insn != bb_end(bb); insn = NEXT_INSN(insn))
> {
>        if (INSN_P(insn))
>           print_rtl_single(insn);
>     }
> }
>  
> Then I compared with the assembly output and the RTL-equivalent and they
> do not come out in the same order.. A couple instructions were even
> moved outside a basic-block... Am I going through the instruction chain
> in the wrong way?

The CFG is not valid at the point of the machine reorg pass, mainly
for historical reasons.  You can see all the insns reliably by doing
  for (insn = get_insns (); insn != NULL_RTX; insn = NEXT_INSN (insn))

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]