Because the default latency and #uops are 1 in a WriteRes, they were
wrong for WriteZero.
Details
- Reviewers
RKSimon craig.topper andreadb
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 18666 Build 18666: arc lint + arc unit
Event Timeline
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 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.
lib/Target/X86/X86SchedBroadwell.td | ||
---|---|---|
159 | You can make all of these tidier by using the X86WriteRes multiclass: defm : X86WriteRes<WriteZero, [], 0, [], 0>; | |
test/CodeGen/X86/avx512-intrinsics-upgrade.ll | ||
2 | General intrinsics/combines tests shouldn't typically be dependent on a specific cpu model - it causes superfluous changes like these - I'll fix the tests shortly. | |
utils/TableGen/GlobalISelEmitter.cpp | ||
1987 | Should this be here? |
Oops, sorry. I'm dropping this. I've started splitting it into several sub-commits. Thanks for the recommandations !
You can make all of these tidier by using the X86WriteRes multiclass: