This is an archive of the discontinued LLVM Phabricator instance.

[X86] Copy the tuning features and scheduler model from pentium4/x86-64 to generic
ClosedPublic

Authored by craig.topper on Aug 20 2020, 12:21 PM.

Details

Summary

This is preparation for making clang default to -mtune=generic when no -march is specified. This will allow the default tuning to be "generic" even though our default march is "pentium4" or "x86-64".

To avoid llc lit test regressions, if no mcpu is specified, I've defaulted tune to use i586 to match the old tuning settings of no CPU. Some tests explicitly used -mcpu=generic which I've removed so they instead get this default of architecture features from generic and tune from i586.

I updated one llvm-mca test to check a different CPU since generic has a scheduler model now

Diff Detail

Event Timeline

craig.topper created this revision.Aug 20 2020, 12:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2020, 12:21 PM
craig.topper requested review of this revision.Aug 20 2020, 12:21 PM

This seems alright, but I lost track of how we got here and where we are going. :)
D83913 added a handful of tuning flags to the Pentium4 model, and we're transferring those over to "generic" in this patch. So we will undo the Pentium4 changes eventually, but that requires some other change?

This seems alright, but I lost track of how we got here and where we are going. :)
D83913 added a handful of tuning flags to the Pentium4 model, and we're transferring those over to "generic" in this patch. So we will undo the Pentium4 changes eventually, but that requires some other change?

Yep. I'm working on a clang patch to set the recently added "tune-cpu" attribute to "generic" by default. While the "target-cpu" attribute will default to "pentium4" or "x86-64". That patch depends on this patch. Once that's in place we can remove the recent changes to pentium4.

spatel accepted this revision.Aug 24 2020, 2:19 PM

LGTM

This revision is now accepted and ready to land.Aug 24 2020, 2:19 PM