[llvm-dev] SchedClasses

Andrew Trick via llvm-dev llvm-dev at lists.llvm.org
Mon Oct 2 13:51:03 PDT 2017



> On Sep 29, 2017, at 6:10 PM, Stefan Teleman <stefan.teleman at gmail.com> wrote:
> 
> 
> 
> On Fri, Sep 29, 2017 at 7:51 PM, Andrew Trick via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
> 
> 
> > /*
> >   LDADDALB_LDADDALH_LDADDALW_LDADDALX = 872, in Sched enum
> > */
> 
> I bet the problem is that “WriteAtomic” is marked unsupported, so it gets an invalid sched class. The invalid NumMicroOps means that the scheduler will assert if it ever sees that instruction.
> 
> 
> ​The scheduler does not assert if it sees LDADDAL, or any other of the LSE instructions on ThunderX2. We've been generating LSE code for months now, with LLVM built in debug+assert+expensive-checks mode.
> 
> —Stefan​

The machine model *should* assert whenever it sees an “unsupported” instruction and the machine model is marked “complete". The scheduler used to have such an assert, but some concessions have been made to handle “incomplete” machine models. Currently, it looks like it picks some default values.

Can you file a bug showing the relevant part of AArch64SchedThunderX2T99.td (CompleteModel=1, WriteAtomic...), a self-contained dump of the machine instrs before scheduling, and -debug-only="machine-scheduler” output? Failing to catch this at compile time is pretty horrible.

-Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171002/abf1d8fc/attachment.html>


More information about the llvm-dev mailing list