This is the mail archive of the gcc-help@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: DFA-scheduler


P. Pavan Kumar wrote:

Respected sir,

DFA pipeline hazard recognizer is used to avoid structural hazards.
While intra block(basic block scheduling) scheduling how data hazards are
avoided . DFA will take care of only structural hazards, but what about
data hazards.

First cycle mutiple pass scheduling algorithm tries different schedules
and choose the best one.
intra block scheduling reorders the instructions within the basic block by
constructing DAG and based on LIST scheduling algorithm .
If First cycle mutiple pass algorithm chooses the best schedule then why
gcc needs intra block scheduling ?

The first cycle mutiple pass algorithm tries to increase number of insns issued on the same cycle while guaranting that the insn with the highest priority (the most important part of which is critical path length) will be issued on the same cycle. It can result in issuing not highest priority insn first. This algorithm is useful for VLIW processors. For example, a VLIW processor (e.g. FRV) requires to put integer insns at the start of VLIW and fp ones at the end. If fp insn has the highest priority, the scheduler without the first cycle mutiple pass algorithm will issue it first putting nops at the start of VLIW and the integer insns in the next VLIW. It means additional cycle for executing the insns. The scheduler with the algorithm will issue the insns on the same cycle (putting them in one VLIW). The algorithm was useful to speed up Itanium benchmarks.

You could read more about this in an article about DFA in proceedings of the first gcc summit (you can find them on gcc web site).

Now gcc will do instruction scheduling beyond basic blocks i,e inter block
scheduling (region scheduling) then why gcc needs intrablock scheduling?


BB scheduling is used only after the RA for all targets except for Itanium (historically there were no practically interblock movements after the RA, and there are even few of them even before the RA). Itanium port uses an extended block scheduling. There is recent Maxim's Kuvyrkov's proposal to make ebb scheduling working for all other targets.

what is command line option for enabling only intra block(with in basic
block) scheduling. and diabling all remaining  intruction scheduling (
trace, modulo etc).



Please, read the documentation. As I remember modulo scheduling and trace scheduling is not on by default. Forcing BB scheduling before the RA can be achieved by prohibiting interblock movements (please see gcc documentation).



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