[PATCH] Refactor duplicate functions

Bernie Ogden bogden at arm.com
Fri Nov 22 06:35:16 PST 2013


You're right, I've failed to preserve the behaviour. I've uploaded a new version of the patch.

I don't suppose you know if that "don't check CPU" behaviour is correct? The effect seems to be -

Non-Darwin: Arch for cpu specified with -mcpu takes precendence over arch specified by -arch/-march
Darwin: Arch specified with -arch/-march takes precendence over arch specified by -mcpu

Though it's perhaps better described by the unit test.

> -----Original Message-----
> From: Tim Northover [mailto:t.p.northover at gmail.com]
> Sent: 22 November 2013 12:18
> To: Bernard Ogden
> Cc: cfe-commits at cs.uiuc.edu; renato.golin at linaro.org;
> t.p.northover at gmail.com; Amara Emerson
> Subject: Re: [PATCH] Refactor duplicate functions
> 
> 
>   Hi Bernie,
> 
>   Thanks very much for taking a stab at this. I'm quite happy with the
> "arm" namespace myself, but have a reservation about Darwin:
> 
> 
> ================
> Comment at: lib/Driver/ToolChain.cpp:167-169
> @@ -166,5 @@
> -                                   const llvm::Triple &Triple) {
> -  // For Darwin targets, the -arch option (which is translated to a
> -  // corresponding -march option) should determine the architecture
> -  // (and the Mach-O slice) regardless of any -mcpu options.
> -  if (!Triple.isOSDarwin()) {
> ----------------
> It's a little difficult to tell because the patch no longer applies
> cleanly to trunk, but I suspect this comment has misled you. Darwin
> *does* take note of -mcpu, and I suspect this patch might disable that.
> 
> 
> http://llvm-reviews.chandlerc.com/D2243
> 
> ARCANIST PROJECT
>   clang








More information about the cfe-commits mailing list