Alex Susu via llvm-dev
2016-Oct-21 00:08 UTC
[llvm-dev] Prioritizing an SDNode for scheduling
Hello. Is there a way to specify in the back end an (ISD::INLINEASM) SDNode to be scheduled first under all circumstances? I need to specify something like node priority to schedule the node before all other nodes in the SelectionDAG of the basic block. (Using chain or glue edges in order to make a node first is not a good idea, since I am doing this at instruction selection time, on individual nodes.) Thank you, Alex
Ehsan Amiri via llvm-dev
2016-Oct-21 14:29 UTC
[llvm-dev] Prioritizing an SDNode for scheduling
You can do this by changing instruction scheduling heuristics. I think the more important question is if this correct always for all platforms. I don't know which scheduler you use. We use GenericScheduler and PostGenericScheduler before and after RA. These classes have a ::tryCandidate method which compares two instructions that can be legally scheduled and decide which of the two should be scheduled. Currently these method are target independent. The correctness question still remains open for me. On Thu, Oct 20, 2016 at 8:08 PM, Alex Susu via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hello. > Is there a way to specify in the back end an (ISD::INLINEASM) SDNode > to be scheduled first under all circumstances? I need to specify something > like node priority to schedule the node before all other nodes in the > SelectionDAG of the basic block. > (Using chain or glue edges in order to make a node first is not a good > idea, since I am doing this at instruction selection time, on individual > nodes.) > > Thank you, > Alex > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161021/ea40164f/attachment.html>
Ehsan Amiri via llvm-dev
2016-Oct-21 14:32 UTC
[llvm-dev] Prioritizing an SDNode for scheduling
I probably misunderstood the question. You probably want to do this in SelectionDAG. On Fri, Oct 21, 2016 at 10:29 AM, Ehsan Amiri <ehsanamiri at gmail.com> wrote:> You can do this by changing instruction scheduling heuristics. I think the > more important question is if this correct always for all platforms. > > I don't know which scheduler you use. We use GenericScheduler and > PostGenericScheduler before and after RA. These classes have a > ::tryCandidate method which compares two instructions that can be legally > scheduled and decide which of the two should be scheduled. Currently these > method are target independent. > > The correctness question still remains open for me. > > > On Thu, Oct 20, 2016 at 8:08 PM, Alex Susu via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hello. >> Is there a way to specify in the back end an (ISD::INLINEASM) SDNode >> to be scheduled first under all circumstances? I need to specify something >> like node priority to schedule the node before all other nodes in the >> SelectionDAG of the basic block. >> (Using chain or glue edges in order to make a node first is not a >> good idea, since I am doing this at instruction selection time, on >> individual nodes.) >> >> Thank you, >> Alex >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161021/38279a85/attachment.html>