FW: [PATCH] Prevent repetetive warnings for unrecognized processors and features

Artyom Skrobov Artyom.Skrobov at arm.com
Mon Jan 20 01:39:12 PST 2014


Hello Evan,

It appears that the code producing the warnings for unrecognized processors
and features had been written by you, some time ago (r134257), so I'd like
to ask you for a review of my patch.


-----Original Message-----
From: Artyom Skrobov [mailto:Artyom.Skrobov at arm.com] 
Sent: 16 January 2014 18:00
To: llvm-commits at cs.uiuc.edu
Subject: [PATCH] Prevent repetetive warnings for unrecognized processors and
features

Hello,

Right now, if I run

$ llc -mcpu=invalid -mattr=+foo,+bar ~/test.ll

I receive six identical "unrecognized processor" warnings, and two identical
warnings for each unrecognized feature:

'invalid' is not a recognized processor for this target (ignoring processor)
'+foo' is not a recognized feature for this target (ignoring feature)
'+bar' is not a recognized feature for this target (ignoring feature)
'invalid' is not a recognized processor for this target (ignoring processor)
'invalid' is not a recognized processor for this target (ignoring processor)
'+foo' is not a recognized feature for this target (ignoring feature)
'+bar' is not a recognized feature for this target (ignoring feature)
'invalid' is not a recognized processor for this target (ignoring processor)
'invalid' is not a recognized processor for this target (ignoring processor)
'invalid' is not a recognized processor for this target (ignoring processor)

We propose a patch that reduces the code duplication and makes sure each
warning is emitted only once; and besides that, it uses SMDiagnostic::print
so that these warning messages are formatted and coloured up consistently
with the normal warning messages.

OK to commit?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unrecognized.patch
Type: application/octet-stream
Size: 8055 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140120/c53ce2d9/attachment.obj>


More information about the llvm-commits mailing list