<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 3, 2014 at 8:29 AM, Artyom Skrobov <span dir="ltr"><<a href="mailto:Artyom.Skrobov@arm.com" target="_blank">Artyom.Skrobov@arm.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
Attached is the new patch, that includes an extensive refactoring of<br>
MCSubtargetInfo and SubtargetFeatures, to prevent the repeated lookups of<br>
CPU entries.<br>
For the feature lookup failures, this still uses a set of strings to mark<br>
the features whose lookup failed; but this set now belongs to the<br>
MCSubtargetInfo instance.<br>
<br>
OK to commit in this new form?<br>
<br>
<br>
Later on, this will probably be accompanied with a front-end fix, as<br>
suggested by Jim.<br></blockquote><div><br></div><div>Any reason not to just fix this in the frontend to begin with? (is it going to be substantially harder)<br><br>That's a fair bit of code in LLVM. Also I'm assuming some of that code moved around and some of it is new - I don't know which bits is which, if this is the right way forward it might be helpful to have the refactoring separated from the semantic changes for greater visibility into the changes.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
-----Original Message-----<br>
From: Jim Grosbach [mailto:<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>]<br>
Sent: 30 January 2014 18:33<br>
To: Artyom Skrobov<br>
Cc: David Blaikie; <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
Subject: Re: [llvm] r199886 - Prevent repetitive warnings for unrecognized<br>
processors and features<br>
<br>
<br>
On Jan 30, 2014, at 10:07 AM, Artyom Skrobov <<a href="mailto:Artyom.Skrobov@arm.com">Artyom.Skrobov@arm.com</a>> wrote:<br>
<br>
>> These are backend diagnostics only, right? I.e., they get issued by MC<br>
>> when using developer tools like llvm-mc, llc, et. al.. They're<br>
>> certainly not diagnostics we would ever expect to see from, e.g.,<br>
>> clang or other user-level front-end. As such, I don't quite follow<br>
>> why we should care about filtering duplicates at all. I don't oppose<br>
>> uniquing them or anything, I just don't personally see it as a<br>
>> priority. YMMV.<br>
><br>
> Yes, that's how it's supposed to be; but occasionally, these diagnostics<br>
> "leak out" of the backend: one particular case that we're aware of, is<br>
><br>
> $ clang -target arm -mcpu=cortex-r4 -c test.c<br>
> clang-3.5: warning: unknown platform, assuming -mfloat-abi=soft<br>
> clang-3.5: warning: unknown platform, assuming -mfloat-abi=soft<br>
> 'cortex-r4' is not a recognized processor for this target (ignoring<br>
> processor)<br>
> 'cortex-r4' is not a recognized processor for this target (ignoring<br>
> processor)<br>
> 'cortex-r4' is not a recognized processor for this target (ignoring<br>
> processor)<br>
> 'cortex-r4' is not a recognized processor for this target (ignoring<br>
> processor)<br>
> 'cortex-r4' is not a recognized processor for this target (ignoring<br>
> processor)<br>
> 'cortex-r4' is not a recognized processor for this target (ignoring<br>
> processor)<br>
<br>
Ew. That should be fixed in the front end to validate the argument to the<br>
-mcpu option. I agree that's pretty bad as-is.<br>
</blockquote></div><br></div></div>