[PATCH] D30739: [OpenMP] "declare simd" for AArch64 Advanced SIMD.

Francesco Petrogalli via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 8 08:15:43 PST 2017


fpetrogalli created this revision.
Herald added subscribers: rengolin, aemerson.

This patch enables the code generation of vector function names that are
described by attaching a "#pragma omp declare simd" directive to the
scalar function definition/declaration, for the Advanced SIMD (NEON)
vector extension of the A64 instruction set for the AArch64 execution
state of the ARMv8 architecture.

As it is done for other targets, the available vector functions are
stored as string attributes attached to the scalar function in the IR,
and are made available for further processing in the middle
end (e.g. exposure to the loop vectorizer).

The mangling function of the vector names is compatible with the
Itanium-standard names that are being generated for X86.

The value of the token that specifies the architecture extension is 'n'

- as for NEON.

Changes
-------

- The `SimdDefaultAlign` value of the AArch64TargetInfo class has been set to 128-bit - the size of a quad-word register "Q" for NEON.
- The name mangling function for X86 has been merged into a generic one

that is shared with AArch64, as `emitTargetDeclareSimdFunction`.

- The CodeGen test has been split into X86 and AArch64 runs.
- To improve readability and maintainability, the actual FileCheck

checks (both for X86 and AArch64) have been moved right after the
respective function declarations.

Note
----

The patch does not introduce any functional change for the X86 target.


https://reviews.llvm.org/D30739

Files:
  lib/Basic/Targets.cpp
  lib/CodeGen/CGOpenMPRuntime.cpp
  test/OpenMP/declare_simd_codegen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30739.91019.patch
Type: text/x-patch
Size: 25280 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170308/15ff30ce/attachment-0001.bin>


More information about the cfe-commits mailing list