[PATCH] D47377: [X86][Sched] Fix WriteZero sched class for all CPUs.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 25 10:22:00 PDT 2018


RKSimon added a comment.

TBH, WriteZero really isn't fit for purpose - its trying to do too much, and with a bit of luck we might be able to get rid of most of it:

FLD1/FLDZ (write f80 constants) seem to always use a resource of some kind - I haven't investigated too much into how they should be tagged although a quick glance at Agner suggests they reasonably match CVTPI2PD (so maybe retag them as WriteCvtI2PD?), or maybe create a WriteF80Constant class - same for the other x87 constants - FLDPI/FLDLG2/FLDL2E/FLDL2T/FLDLN2 as they typically are all the same (although incorrectly set to WriteMicrocoded by the looks of the tests).

The xmm/ymm/gpr zero idioms will hopefully be handled by variants (see https://reviews.llvm.org/D47374 which gets more of this in place) - not sure what to do with the zero psuedo instructions, maybe keep WriteZero just for them (or move into WriteNOP)?

The remaining cases (CLC etc.) might almost be better off using WriteNOP, or a target specific equivalent.


Repository:
  rL LLVM

https://reviews.llvm.org/D47377





More information about the llvm-commits mailing list