This is an archive of the discontinued LLVM Phabricator instance.

Power9 - Enable the pwr9 cpu in the back end
ClosedPublic

Authored by nemanjai on Apr 28 2016, 1:04 PM.

Details

Summary

This patch simply adds support for -mcpu=pwr9 in the back end. It makes some preliminary decisions with regard to scheduling that are likely to change once the necessary information becomes available. Any such decisions have FIXME in the code and refer to POWER9 so they are easy to find once we start adding this support.

Since this patch doesn't really add any functional changes, there is no tests associated. The subsequent patches will add exploitation of the new instructions and will have test cases as well.

Diff Detail

Repository
rL LLVM

Event Timeline

nemanjai updated this revision to Diff 55467.Apr 28 2016, 1:04 PM
nemanjai retitled this revision from to Power9 - Enable the pwr9 cpu in the back end.
nemanjai updated this object.
nemanjai set the repository for this revision to rL LLVM.
nemanjai added a subscriber: llvm-commits.
kbarton accepted this revision.May 3 2016, 10:09 AM
kbarton edited edge metadata.

LGTM

This revision is now accepted and ready to land.May 3 2016, 10:09 AM
nemanjai edited edge metadata.May 3 2016, 12:56 PM
nemanjai added a subscriber: echristo.

Unrelated to this commit, but does FeatureISA3_0 make sense as a subtarget feature or should more granularity happen here?

Otherwise it would be nice to see any tests that make sure that mcpu=pwr9 is actually doing something :)

-eric

Unrelated to this commit, but does FeatureISA3_0 make sense as a subtarget feature or should more granularity happen here?

Otherwise it would be nice to see any tests that make sure that mcpu=pwr9 is actually doing something :)

-eric

Due to the ISA not having any optional categories, we have decided that for most things, we don't want the granularity that we had with prior ISA levels. What we kind of settled on was the P9Vector, P9Altivec and ISA3_0. If you prefer that we split them out into finer grained features, we can certainly discuss what features we'd want.

For testing, I'll add an -mcpu=pwr9 line to one of the test cases to ensure that the feature is accepted by llc. Functional testing for the target features and predicates is already available in my follow-up patch for the new non-permuting loads and stores.

nemanjai closed this revision.May 9 2016, 12:01 PM

Committed revision 268950.

Unrelated to this commit, but does FeatureISA3_0 make sense as a subtarget feature or should more granularity happen here?

Otherwise it would be nice to see any tests that make sure that mcpu=pwr9 is actually doing something :)

-eric

Due to the ISA not having any optional categories, we have decided that for most things, we don't want the granularity that we had with prior ISA levels. What we kind of settled on was the P9Vector, P9Altivec and ISA3_0. If you prefer that we split them out into finer grained features, we can certainly discuss what features we'd want.

Good for me for now, and if we feel a need to have them split we can.

For testing, I'll add an -mcpu=pwr9 line to one of the test cases to ensure that the feature is accepted by llc. Functional testing for the target features and predicates is already available in my follow-up patch for the new non-permuting loads and stores.

Cool.

-eric