[PATCH] Refactor duplicate functions

Renato Golin renato.golin at linaro.org
Fri Nov 22 13:16:49 PST 2013


On 22 November 2013 19:55, Jim Grosbach <grosbach at apple.com> wrote:

> Using -march= and -mcpu= at the same time should probably be a hard error.
> -march is preferable and 32-bit ARM is the outlier for historical reasons
> in preferring -mcpu. I’d love to be able to change that, but it’s likely to
> be a hard road.
>

The problem is that ARMv7A has very different CPU types (A8 vs. A9 vs.
A15), so getting "armv7a" doesn't narrow it down well enough. For all the
rest (M and R), it's ok to say "armv7r", "armv6m", "armv7m" (mostly by
coincidence, not design).

Some alternatives, such as "armv7l" or "armv7hl", don't specify the CPU,
while "armv7s", "armv7k" or "armv7f" do, but it's not "v7a", which makes it
even more cryptic. With all that confusion, I still prefer the good old
-mcpu over -march every day.

Also, I don't think that (march + mcpu) should be a hard error, unless your
march can completely specify the CPU type, or at least, the optimization
profile.

cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131122/a3738a75/attachment.html>


More information about the cfe-commits mailing list