[PATCH] D70466: [PowerPC] Separate Features that are known to be Power9 specific from Future CPU
Nemanja Ivanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 20 10:39:58 PST 2019
nemanjai added a comment.
In D70466#1753176 <https://reviews.llvm.org/D70466#1753176>, @steven.zhang wrote:
> The feature list here assume that, new processor will contain superset of features of those that came before it. And we are trying to break the assumption here. Can we do it another way. That is, keep the TD unchanged and check the CPU Directive in PPCSubtarget ? i.e.
>
> PPCSubtarget::vectorsUseTwoUnits() const { return VectorsUseTwoUnits && DarwinDirective == PPC::DIR_PWR9; }
>
I strongly disagree with this suggestion. The CPU model should reflect the features that the CPU supports. Separating out checks this way is an unnecessary separation of concerns that make it difficult for the uninitiated reader to decipher what CPU has which feature.
The fact is that the Power9 CPU has some quirks that make it stand out from other CPUs such as Power8 (i.e. no fusion capability, narrower dispatch width for vectors, etc.). There is no reason to expect that these quirks will exist in any future CPUs. It is really helpful in terms of readability to see in one place that this CPU does not follow the regular progression of Power CPUs and to see exactly what it does differently.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70466/new/
https://reviews.llvm.org/D70466
More information about the llvm-commits
mailing list