summaryrefslogtreecommitdiff
path: root/clang/lib/Basic/IdentifierTable.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2015-07-30 22:47:41 +0000
committerHans Wennborg <hans@hanshq.net>2015-07-30 22:47:41 +0000
commit6e8ff10647740a3d67fe534fc09ffc769ff78c57 (patch)
tree9ed1a80308ae87ad8b55423bc9946660eba3119a /clang/lib/Basic/IdentifierTable.cpp
parent6b7585ca3f1cda190491c5bf16aefdf6d6fce41a (diff)
Merging r243642, r243643, and r243644:llvmorg-3.7.0-rc2
------------------------------------------------------------------------ r243642 | uweigand | 2015-07-30 07:08:36 -0700 (Thu, 30 Jul 2015) | 29 lines Add support for System z vector language extensions The z13 vector facility has an associated language extension, closely modeled on AltiVec/VSX. The main differences are: - vector long, vector float and vector pixel are not supported - vector long long and vector double are supported (like VSX) - comparison operators return a vector rather than a scalar integer - shift operators behave like the OpenCL shift operators - vector bool is only supported as argument to certain operators; some operators allow mixing a bool with a non-bool vector This patch adds clang support for the extension. It is closely modelled on the AltiVec support. Similarly to the -faltivec option, there's a new -fzvector option to enable the extensions (as well as an -mzvector alias for compatibility with GCC). There's also a separate LangOpt. The extension as implemented here is intended to be compatible with the -mzvector extension recently implemented by GCC. Based on a patch by Richard Sandiford. Differential Revision: http://reviews.llvm.org/D11001 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r243643 | uweigand | 2015-07-30 07:10:43 -0700 (Thu, 30 Jul 2015) | 18 lines [SystemZ] Add support for vecintrin.h vector built-in functions This patch adds support for the System Z vector built-in functions. The API-defined header file has the name vecintrin.h. The user-level functions are defined in the same style as the clang version of altivec.h, making heavy use of the __overloadable__ and __always_inline__ attributes. Where possible the functions expand to generic operations rather than specific built-in functions, in the hope that that form can be optimised better. Where a built-in routine is specified to require an immediate integer argument, the __enable_if__ attribute is used to verify the argument is in fact constant and in the appropriate range. Based on a patch by Richard Sandiford. ------------------------------------------------------------------------ ------------------------------------------------------------------------ r243644 | uweigand | 2015-07-30 08:53:58 -0700 (Thu, 30 Jul 2015) | 21 lines Fix sanitizer fallout from r243642 The memory-sanitizer build bot reported: ==5574== WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x7f03089e15f6 in clang::Parser::TryAltiVecTokenOutOfLine(clang::DeclSpec&, clang::SourceLocation, char const*&, unsigned int&, bool&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/tools/clang/lib/Parse/ParseDecl.cpp:6290:11 This is because the "Ident_pixel" variable was uninitialized in the getLangOpts().ZVector case, but we'd still call into clang::Parser::TryAltiVecTokenOutOfLine, which uses the variable. The simplest fix for this without sprinkling !getLangOpts().ZVector checks all over the code seems to be to just initialize the variable to nullptr; this will then do the right thing on ZVector. Checked in to unbreak the build bots. ------------------------------------------------------------------------ llvm-svn: 243699
Diffstat (limited to 'clang/lib/Basic/IdentifierTable.cpp')
-rw-r--r--clang/lib/Basic/IdentifierTable.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp
index dcb7603bf5ab..7705834d91a0 100644
--- a/clang/lib/Basic/IdentifierTable.cpp
+++ b/clang/lib/Basic/IdentifierTable.cpp
@@ -110,7 +110,8 @@ namespace {
HALFSUPPORT = 0x08000,
KEYCONCEPTS = 0x10000,
KEYOBJC2 = 0x20000,
- KEYALL = (0x3ffff & ~KEYNOMS18 &
+ KEYZVECTOR = 0x40000,
+ KEYALL = (0x7ffff & ~KEYNOMS18 &
~KEYNOOPENCL) // KEYNOMS18 and KEYNOOPENCL are used to exclude.
};