[PATCH] Add error checking to reject neon_vector_type attribute on targets without NEON

Artyom Skrobov Artyom.Skrobov at arm.com
Mon Sep 16 01:36:58 PDT 2013


Re-posting, attaching the patch itself which is for review.


-----Original Message-----
From: Bernard Ogden 
Sent: 13 September 2013 11:02
To: Artyom Skrobov; llvm-commits at cs.uiuc.edu
Subject: RE: [PATCH] Add error checking to reject neon_vector_type attribute
on targets without NEON

Hi Artyom,

LGTM - but I think you should have posted this one on cfe-commits.

The removal of the "sophisticated string parsing" gave me some pause as I
think that architecturally-illegal feature combinations should result in a
warning, at a minimum - but I'm fairly sure that other illegal combinations
are permitted and this specific check is clearly broken, so discarding it
seems the pragmatic thing to do.

Regards,

Bernie

> -----Original Message-----
> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> bounces at cs.uiuc.edu] On Behalf Of Artyom Skrobov
> Sent: 12 September 2013 17:17
> To: llvm-commits at cs.uiuc.edu
> Subject: [PATCH] Add error checking to reject neon_vector_type
> attribute on targets without NEON
> 
> Hello,
> 
> We have discovered that test/Sema/neon-vector-types.c did not specify a
> target, therefore testing the NEON-related attributes on the host
> platform (which, in many cases, wouldn't even be ARM!)
> 
> In addition to correcting this oversight in the test, we're adding a
> check that the NEON-related attributes aren't used on a target without
> NEON.
> 
> We're also removing the sophisticated string parsing from
> ARMTargetInfo::hasFeature, on the grounds that it's 1) broken in cases
> when target CPU name is not specified explicitly; 2) outdated by
> disregarding ARMv8; 3) clearly in the wrong place -- analysing target
> CPU capabilities belongs in ARMTargetInfo initialisation, but needs not
> re-run every time a NEON-related feature is used.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: neon_attributes.patch
Type: application/octet-stream
Size: 9754 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130916/70e6fa74/attachment.obj>


More information about the cfe-commits mailing list