[PATCH] ARM & AArch64: share NEON builtin enumerators

Tim Northover t.p.northover at gmail.com
Thu Jan 30 03:58:53 PST 2014


Hi all,

Currently, both ARM and AArch64 targets make use of essentially the same __builtin_neon_XYZ intrinsics, which results in duplicated ARM::BI__builtin_neon_XYZ and AArch64::BI__builtin_neon_XYZ enumerators. Since the two targets share much of the NEON intrinsic codegen, these then have to be translated manually.

This patch factors out those enumerators into a separate "NEON" namespace. Currently, no further refactoring happens, but my intent is to (probably reasonably gradually) put ARM and AArch64 on a more equal footing where both sets of CodeGen defer to some kind of EmitNEONBuiltin function, instead of the current situation where AArch64 calls directly to EmitARMBuiltin.

The mapping between enumerator and builtin string is a little fragile, but I don't think significantly worse than before. Does the approach (and goal) look reasonable? And if so, can I commit this?

Cheers.

Tim.

http://llvm-reviews.chandlerc.com/D2654

Files:
  include/clang/Basic/BuiltinsAArch64.def
  include/clang/Basic/BuiltinsARM.def
  include/clang/Basic/TargetBuiltins.h
  lib/Basic/Targets.cpp
  lib/CodeGen/CGBuiltin.cpp
  utils/TableGen/NeonEmitter.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2654.1.patch
Type: text/x-patch
Size: 173504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140130/788608dd/attachment.bin>


More information about the cfe-commits mailing list