[LLVMdev] Preferential treatment of labels in MI sched DAG construction

Sergei Larin slarin at codeaurora.org
Mon Feb 11 13:03:06 PST 2013


Hi Andy,

  I have to resurrect an ancient question regarding scheduling boundaries.

You might remember the reason for introduction of CanHandleTerminators to
ScheduleDAGInstrs. In short, Hexagon is currently uses DAG construction
method (buildSchedGraph) for several purposes, which includes region
formation for general VLIW packetization/bundling. As such we need to handle
pretty much all instructions and any terminators, including labels (though I
know it sounds strange). Nevertheless, ScheduleDAGInstrs::buildSchedGraph
still has this hard assert in it:

assert((!MI->isTerminator() || CanHandleTerminators) && !MI->isLabel() &&
           "Cannot schedule terminators or labels!");

...and we have been OK till now by simply disabling it in our local version
of the code, but since we are now working towards upstreaming all our code,
this could no longer be ignored.

  I guess my proposal is not to treat labels differently from any other
terminator - if a target wants to "schedule" labels - let it do so. It
actually works just fine for Hexagon... so if we can change this assert to
something like:


assert((!MI->isTerminator() || CanHandleTerminators) && "Cannot schedule
terminators or labels!");

  It would equal label in rights with any other terminator. What do you
think?


Sergei

---
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
The Linux Foundation






More information about the llvm-dev mailing list