This prepares actually adding/fixing the AVX512-specific scheduling info.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 18949 Build 18949: arc lint + arc unit
Event Timeline
Note that this breaks scheduler tests for "GENERIC" , since we're using SNB. Is that fine ? Is there any situation where we would emit AVX512 but still use generic to schedule ?
Sorry it's not fine. Specifying by ISA feature attribute and not cpu model is a common occurrence. SNB needs to "support" all scheduler classes.
My recommendation from D47721 was to not introduce any new classes in this new patch - it should purely be about flagging unsupported existing classes on each model. D47721 would then be about adding the new ZMM classes.
lib/Target/X86/X86SchedSandyBridge.td | ||
---|---|---|
99 | SNB is our generic model - we can't flag it as not supporting ANY instruction. Remove these entries and leave a note explaining why. |
That's what I was afraid of :(
How do we choose which scheduling info we want to use for SNB for unsupported instructions ? Do we just come up with something random ?
My recommendation from D47721 was to not introduce any new classes in this new patch - it should purely be about flagging unsupported existing classes on each model.
OK: so each model but SNB, right ?
Now there's the question of what we do with KNL, which has AVX512 but uses the HaswellModel. Opinions ?
lib/Target/X86/X86SchedHaswell.td | ||
---|---|---|
144 | This is going to be a problem for KNL....... | |
lib/Target/X86/X86SchedSandyBridge.td | ||
104 | Keep the comment, but I'd probably recommend just leaving these in their original places (possibly with an "// Unsupported" next to it?) for comparison to "supported" cases - I typically just copied the YMM values for the ZMM cases - not great but it at least had consistency........ | |
lib/Target/X86/X86ScheduleAtom.td | ||
83 | There are a lot more than this that aren't supported in this model - move them too? | |
lib/Target/X86/X86ScheduleBtVer2.td | ||
162 | There are a lot more than this that aren't supported in this model - move them too? | |
lib/Target/X86/X86ScheduleSLM.td | ||
82 | There are a lot more than this that aren't supported in this model - move them too? |
lib/Target/X86/X86SchedHaswell.td | ||
---|---|---|
144 | Until KNL moves to its own model (PR26418) the HSW model is going to have to be left in a similar state to SNB, |
What do you think about adding X86WriteUnsupported and X86WriteUnsupportedResPair to X86Schedule.td (similar to D47766) - that way we can keep the unsupported classes in place (next to the XMM/YMM versions) - they might be easy to track then.
That's something I was considering after the discussion on the other thread. I'll update the diff.
LGTM with one minor - thanks.
lib/Target/X86/X86ScheduleSLM.td | ||
---|---|---|
467 | The others in this block can be converted as well. |
This is going to be a problem for KNL.......