[PATCH] D24521: [ARM] Add Marvell PJ4 cpu

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 14 02:10:21 PDT 2016


rengolin added a comment.

Hi Kai,

This request actually has two different ideas:

1. Adding the host CPU detection (not target's), so that when running Clang natively on the Armada, you detect the right CPU. Returning "marvel-pj4" and implementing the core's defaults in the TargetParser (no NEON, MMX2, etc) should be enough for your purposes.

2. Implementing PJ4's model in TableGen, which is used for scheduler and code-generation purposes, not compliance. This is a more serious issue and needs some long experimentation to find the correct options. I don't think this is what you want.

So, the question is: What's the motivation behind this?

We generally only add new cores when we have better scheduling or performance reasons to do so, and you're not adding any of that. The detection system only works when running native, for everything else, we need the specific triples and arch options to get it right.

You'll also need tests, to make sure the options are chosen correctly, and to express your intent to future investigations from this commit. I don't know how to test the `cpuinfo` parsing, but once you have the cpu name, you can use the TargetParserTest unit test to make sure you have the right options.

cheers,
--renato


https://reviews.llvm.org/D24521





More information about the llvm-commits mailing list