This is the mail archive of the 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: Scheduler:LLVM vs gcc, which is better

On Mon, Mar 10, 2014 at 7:33 PM, lin zuojian <> wrote:
> Hi,
>     I just ask for opinions.I think many GCC developers do familiar with
>     the opponent.If I ask in the LLVM mailing list, I have to worry
>     about If they are familiar with GCC, too(what's sched2 pass?).

I suspect you will have the same problem on both lists. The internal
details of the scheduling system are not likely to be widely known

To provide a very brief summary of what is going on in LLVM to the
best of my knowledge (although I am not one of the experts on this

The DAG (or more fully, the SelectionDAG) is not really relevant to
scheduling any more[1]. It is just a mechanism used for legalization
and combining the target-specific representation prior to producing
very low level "MI" or Machine Instructions. That is, it is entirely
an instruction selection tool, not a a scheduling tool.

The scheduling takes place amongst the machine instructions either
before or after register allocation (depending on the target) and with
a wide variety of heuristics. My understanding is that it is
attempting to solve the same fundamental scheduling problems as GCC's
infrastructure (ILP and register pressure). The infrastructure is the
bulk of it though, and that is likely entirely specific to the
representation and innards of the respective compilers.

Given that LLVM's machine level scheduler is significantly younger
than GCC's, I would expect it to be less well tuned and have less
complete and/or accurate modeling for some targets.


[1] Historically, we did both instruction selection and scheduling
using the DAG, but the scheduling has moved into the MI layer
specifically to address register pressure and ILP concerns that were
hard/impossible to handle at a higher level. There is some hope that
the DAG goes away completely and is replaced with some simpler
selection and legalization framework, but that hasn't yet emerged.

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