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: help on - instruction scheduling passes in gcc


ddmetro <puzzlesdj@gmail.com> writes:

> 1. We are expecting that pass_sched and pass_sched2, each will enter
> schedule_insns() function once per pass. However, we found that it is
> entering schedule_insns() function per function(in the program) per pass.
> (If there are two functions in the input program, pass_sched will enter
> schedule_insns() twice and pass_sched2 will also enter schedule_insns()
> twice.)We are not able to track this flow in the code. Kindly help us as to
> what are we missing out?

I got six copies of your message.  One is sufficient.

The optimization passes are all run for each function.  If you have
two functions, pass_sched and pass_sched2 will each be run twice.


> 2. We are trying to visualize the code into regions and then into basic
> blocks i.e., what all insns form a basic block and what basic blocks form a
> region. 
>    Also we are trying to figure out - the before and after scenarios - when
> an insn moves from one basic block to another.
>    However we are not able to map this information looking at any of the rtl
> dump files. 
>    Kindly help us as to what should be our approach?

Look for the basic block notes or use -fdump-rtl-all-blocks.


> 3. We are trying to figure out the difference and need of 2 passes, both
> calling the same function(schedule_insns()). However, we are unable to find
> any difference in the two calls to schedule_insns() in two schedule
> passes(pass_sched and pass_sched2). Kindly help us as to what are we missing
> out?

The difference is that pass_sched is called before register allocation
and pass_sched2 is called after.

Ian


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