This is an archive of the discontinued LLVM Phabricator instance.

[X86] Introduce X86SchedWriteWidths schedule wrapper for different vector widths.
ClosedPublic

Authored by RKSimon on Apr 30 2018, 7:48 AM.

Details

Summary

We need to split most of the scheduler classes by vector width to remove more of the InstRW overrides, this patch should make this easier/tidier by allowing us to pass the X86SchedWriteWidths wrapper to multi-width multiclasses and then split as required.

At the moment I've included fields for Scl (scalar - I wasn't sure if I should split this into SS/SD?), MMX (MMX integer), XMM, YMM and ZMM widths. These fields mostly share the same classes but it should give us the flexibility that we may need in the future.

This patch has replaced a set of example SSE/AVX512 instruction cases but isn't exhaustive as it gets very noisy.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Apr 30 2018, 7:48 AM

This seems reasonsable to me. For the scalar question, do any CPUs have different scalar performance? Except for divide/sqrt instructions.

This seems reasonsable to me. For the scalar question, do any CPUs have different scalar performance? Except for divide/sqrt instructions.

There are a few models that have different fmul values as well - Atom + Btver2 for instance - they can be just split into float/double classes like I intend to for fsqrt/fdiv.

This revision is now accepted and ready to land.Apr 30 2018, 10:47 AM
This revision was automatically updated to reflect the committed changes.