[PATCH] Prevent repetitive warnings for unrecognized processors and features (2nd attempt)

David Blaikie dblaikie at gmail.com
Mon Feb 3 15:48:00 PST 2014


On Mon, Feb 3, 2014 at 3:30 PM, Renato Golin <renato.golin at linaro.org>wrote:

> On 3 February 2014 22:57, David Blaikie <dblaikie at gmail.com> wrote:
>
>> Any reason not to just fix this in the frontend to begin with? (is it
>> going to be substantially harder)
>>
>
> I was not involved on the original discussion, but I wonder... If a flag
> is not recognized by the front-end, should it still be emitted to the
> back-end? I think that Clang should emit a "cpu not recognized, default to
> whatever cpu" warning and set the cpu to whatever default it should.
>
> Of course, this is orthogonal to the bug in question, which should be
> fixed even if the front-end stops being silly, as we do have (and can have)
> many front-ends.
>

Knowing little about argument handling in LLVM, I'm not sure that's true -
I expect we could replace string-identification with an enum or the like
for frontend-to-LLVM communication so there'd be no need for LLVM to
revalidate the input (I guess llc might still have to duplicate this
checking). That'd be my abstract ideal/idea anyway... perhaps there are
other issues.

Certainly if this does have to be fixed in LLVM anyway, we might as well do
it regardless of how soon the fix comes to Clang.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140203/7f64b3de/attachment.html>


More information about the llvm-commits mailing list