[LLVMdev] hazard scheduling nodes

Andrew Trick atrick at apple.com
Fri Mar 8 18:04:46 PST 2013

On Feb 21, 2013, at 9:11 AM, Jonas Paulsson <jonas.paulsson at ericsson.com> wrote:

> Hi,
> I am trying to add Hazard scheduling nodes after buildSchedGraph(), with a scheduler derived from ScheduleDAGInstrs. I get weird errors, so I wonder what I am doing wrong?
> What I am doing right now is:
> I have a created MI with opcode HAZARD that does not have parent, and I greate a SUnit(HazardMI). I use this one HazardMI for all hazard nodes.
> I remove all edges using removePred.
> I insert edges between Node -> hazardNode -> pred.
> What is there to think about in this approach? I must be missing some detail…
> Any help is appreciated,
> Jonas Paulsson

Jonas, I'm sorry I forgot to respond to this. Hopefully you figured out how to debug it. I'm not sure if you're using the MachineScheduler pass or PostRAScheduler. 

For MachineScheduler, use -view-misched-dags and -debug-only=misched.

For PostRA: -debug-only=post-RA-sched.

Modifying the DAG edges is tricky to get right. But removePred() and addPred() are the basic primitives...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130308/6050b928/attachment.html>

More information about the llvm-dev mailing list