[PATCH] D38852: [Hexagon] Handling of new HVX flags and target-features
Sumanth Gundapaneni via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 12 09:28:01 PDT 2017
sgundapa created this revision.
Herald added a subscriber: eraman.
This patch has the following changes
1. A new flag "-mhvx-length={64B|128B}" is introduced to specify the
length of the vector. Previously we have used "-mhvx-double" for 128 Bytes.
This adds the target-feature "+hvx-length{64|128}b"
2. The "-mhvx" flag must be provided on command line to enable HVX for Hexagon.
If no -mhvx-length flag is specified, a default length is picked from the arch
mentioned in this priority order from either -mhvx=vxx or -mcpu. For v60 and v62
the default length is 64 Byte. For unknown versions, the length is 128 Byte.
The -mhvx flag adds the target-feature "+hvxv{hvx_version}"
3. The 64 Byte mode is soon going to be deprecated. A warning is emitted if 64 Byte
is enabled. A warning is still emitted for the default 64 Byte as well. This warning
can be suppressed with a -Wno flag.
4. The "-mhvx-double" and "-mno-hvx-double" flags are deprecated. A warning is
emitted if the driver sees them on commandline. "-mhvx-double" is an alias to
"-mhvx-length=128B"
5. The compilation will error out if -mhvx-length is specified with out an
-mhvx/-mhvx= flag
6. The macro __HVX_LENGTH__ is defined and is set to the length of the
vector.
Eg: #define __HVX_LENGTH__ 64
7. The macro __HVX_ARCH__ is defined and is set to the version of the HVX.
Eg: #define __HVX_ARCH__ 62
Repository:
rL LLVM
https://reviews.llvm.org/D38852
Files:
include/clang/Basic/DiagnosticDriverKinds.td
include/clang/Driver/Options.td
lib/Basic/Targets/Hexagon.cpp
lib/Basic/Targets/Hexagon.h
lib/Driver/ToolChains/Clang.cpp
lib/Driver/ToolChains/Hexagon.cpp
lib/Driver/ToolChains/Hexagon.h
test/CodeGen/hexagon-inline-asm.c
test/Driver/hexagon-hvx.c
test/Preprocessor/hexagon-predefines.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38852.118802.patch
Type: text/x-patch
Size: 21588 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171012/bf2f7b48/attachment-0001.bin>
More information about the cfe-commits
mailing list