aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-02-19 20:57:58 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-02-19 20:57:58 +0000
commitbda3d407185047106bde6af5367ddab7d3a3142f (patch)
treeb0d1eaed14959a7722ff246ffa303348922e9fb5
parentec12bbe359799efc32df6bde5e872cb2713c0b19 (diff)
Vendor import of clang RELEASE_360/rc4 tag r229772 (effectively, 3.6.0 RC4):vendor/clang/clang-release_360-r229772
Notes
Notes: svn path=/vendor/clang/dist/; revision=279021 svn path=/vendor/clang/clang-release_360-r229772/; revision=279022; tag=vendor/clang/clang-release_360-r229772
-rw-r--r--docs/ReleaseNotes.rst39
-rw-r--r--lib/CodeGen/TargetInfo.cpp18
-rw-r--r--lib/Driver/ToolChains.cpp3
-rw-r--r--test/CodeGen/x86_64-arguments.c22
4 files changed, 45 insertions, 37 deletions
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index 337f9387fe6c..5aeb2ad5a4f0 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -1,6 +1,6 @@
-=====================================
-Clang 3.6 (In-Progress) Release Notes
-=====================================
+=======================
+Clang 3.6 Release Notes
+=======================
.. contents::
:local:
@@ -8,12 +8,6 @@ Clang 3.6 (In-Progress) Release Notes
Written by the `LLVM Team <http://llvm.org/>`_
-.. warning::
-
- These are in-progress notes for the upcoming Clang 3.6 release. You may
- prefer the `Clang 3.5 Release Notes
- <http://llvm.org/releases/3.5.0/tools/clang/docs/ReleaseNotes.html>`_.
-
Introduction
============
@@ -22,8 +16,8 @@ frontend, part of the LLVM Compiler Infrastructure, release 3.6. Here we
describe the status of Clang in some detail, including major
improvements from the previous release and new feature work. For the
general LLVM release notes, see `the LLVM
-documentation <http://llvm.org/docs/ReleaseNotes.html>`_. All LLVM
-releases may be downloaded from the `LLVM releases web
+documentation <http://llvm.org/releases/3.6.0/docs/ReleaseNotes.html>`_.
+All LLVM releases may be downloaded from the `LLVM releases web
site <http://llvm.org/releases/>`_.
For more information about Clang or LLVM, including information about
@@ -31,11 +25,6 @@ the latest release, please check out the main please see the `Clang Web
Site <http://clang.llvm.org>`_ or the `LLVM Web
Site <http://llvm.org>`_.
-Note that if you are reading this file from a Subversion checkout or the
-main Clang web page, this document applies to the *next* release, not
-the current one. To see the release notes for a specific release, please
-see the `releases page <http://llvm.org/releases/>`_.
-
What's New in Clang 3.6?
========================
@@ -163,15 +152,15 @@ OpenCL C Language Changes in Clang
OpenMP Language Changes in Clang
--------------------------------
-Clang 3.6 contains codegen for many individual pragmas for OpenMP but combinations are not completed as yet.
-We plan to continue codegen code drop aiming for completion for 3.7. Please see this link for up-to-date
-`status <https://github.com/clang-omp/clang/wiki/Status-of-supported-OpenMP-constructs>_`
-LLVM’s OpenMP runtime library, originally developed by Intel, has been modified to work on ARM, PowerPC,
-as well as X86. The Runtime Library's compatibility with GCC 4.9 is improved
-- missed entry points added, Barrier and fork/join code improved, one more type of barrier enabled.
-Support for ppc64le architecture is now available and automatically detected when using cmake system.
-Using makefile the new "ppc64le" arch type is available.
-Contributors to this work include AMD, Argonne National Lab., IBM, Intel, Texas Instruments, University of Houston and many others.
+Clang 3.6 contains codegen for many individual OpenMP pragmas, but combinations are not completed as yet.
+We plan to continue codegen code drop aiming for completion in 3.7. Please see this link for up-to-date
+`status <https://github.com/clang-omp/clang/wiki/Status-of-supported-OpenMP-constructs>_`.
+LLVM's OpenMP runtime library, originally developed by Intel, has been modified to work on ARM, PowerPC,
+as well as X86. The Runtime Library's compatibility with GCC 4.9 is improved
+- missed entry points added, barrier and fork/join code improved, one more type of barrier enabled.
+Support for ppc64le architecture is now available and automatically detected when using cmake system.
+Using makefile the new "ppc64le" arch type is available.
+Contributors to this work include AMD, Argonne National Lab., IBM, Intel, Texas Instruments, University of Houston and many others.
Internal API Changes
--------------------
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index 6ad349515769..39cc7e5d99c4 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/lib/CodeGen/TargetInfo.cpp
@@ -2134,19 +2134,15 @@ ABIArgInfo X86_64ABIInfo::getIndirectResult(QualType Ty,
return ABIArgInfo::getIndirect(Align);
}
-/// GetByteVectorType - The ABI specifies that a value should be passed in an
-/// full vector XMM/YMM register. Pick an LLVM IR type that will be passed as a
-/// vector register.
+/// The ABI specifies that a value should be passed in a full vector XMM/YMM
+/// register. Pick an LLVM IR type that will be passed as a vector register.
llvm::Type *X86_64ABIInfo::GetByteVectorType(QualType Ty) const {
- llvm::Type *IRType = CGT.ConvertType(Ty);
+ // Wrapper structs/arrays that only contain vectors are passed just like
+ // vectors; strip them off if present.
+ if (const Type *InnerTy = isSingleElementStruct(Ty, getContext()))
+ Ty = QualType(InnerTy, 0);
- // Wrapper structs that just contain vectors are passed just like vectors,
- // strip them off if present.
- llvm::StructType *STy = dyn_cast<llvm::StructType>(IRType);
- while (STy && STy->getNumElements() == 1) {
- IRType = STy->getElementType(0);
- STy = dyn_cast<llvm::StructType>(IRType);
- }
+ llvm::Type *IRType = CGT.ConvertType(Ty);
// If the preferred type is a 16-byte vector, prefer to pass it.
if (llvm::VectorType *VT = dyn_cast<llvm::VectorType>(IRType)){
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 4d97ab3bf485..f789fd55598f 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -3154,7 +3154,8 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
SmallVector<StringRef, 5> dirs;
CIncludeDirs.split(dirs, ":");
for (StringRef dir : dirs) {
- StringRef Prefix = llvm::sys::path::is_absolute(dir) ? SysRoot : "";
+ StringRef Prefix =
+ llvm::sys::path::is_absolute(dir) ? StringRef(SysRoot) : "";
addExternCSystemInclude(DriverArgs, CC1Args, Prefix + dir);
}
return;
diff --git a/test/CodeGen/x86_64-arguments.c b/test/CodeGen/x86_64-arguments.c
index 5d01d3bf69ed..e82e7b067ada 100644
--- a/test/CodeGen/x86_64-arguments.c
+++ b/test/CodeGen/x86_64-arguments.c
@@ -184,6 +184,28 @@ struct v4f32wrapper f27(struct v4f32wrapper X) {
return X;
}
+// PR22563 - We should unwrap simple structs and arrays to pass
+// and return them in the appropriate vector registers if possible.
+
+typedef float v8f32 __attribute__((__vector_size__(32)));
+struct v8f32wrapper {
+ v8f32 v;
+};
+
+struct v8f32wrapper f27a(struct v8f32wrapper X) {
+ // AVX-LABEL: define <8 x float> @f27a(<8 x float> %X.coerce)
+ return X;
+}
+
+struct v8f32wrapper_wrapper {
+ v8f32 v[1];
+};
+
+struct v8f32wrapper_wrapper f27b(struct v8f32wrapper_wrapper X) {
+ // AVX-LABEL: define <8 x float> @f27b(<8 x float> %X.coerce)
+ return X;
+}
+
// rdar://5711709
struct f28c {
double x;