]> granicus.if.org Git - clang/log
clang
8 years ago[PCH] Fix timestamp check on windows hosts.
Pierre Gousseau [Wed, 13 Jul 2016 11:58:28 +0000 (11:58 +0000)]
[PCH] Fix timestamp check on windows hosts.

On Linux, if the timestamp of a header file, included in the pch, is modified, then including the pch without regenerating it causes a fatal error, which is reasonable.
On Windows the check is ifdefed out, allowing the compilation to continue in a broken state.
The root of the broken state is that, if timestamps dont match, the preprocessor will reparse a header without discarding the pch data.
This leads to "#pragma once" header to be included twice.
The reason behind the ifdefing of the check lacks documentation, and was done 6 years ago.
This change tentatively removes the ifdefing.

First part of patch proposed at:

Differential Revision: http://reviews.llvm.org/D20867

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275261 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OpenCL] Fix code generation of kernel pipe parameters.
Alexey Bader [Wed, 13 Jul 2016 10:28:13 +0000 (10:28 +0000)]
[OpenCL] Fix code generation of kernel pipe parameters.

Improved test with user define structure pipe type case.

Reviewers: Anastasia, pxli168
Subscribers: yaxunl, cfe-commits

Differential revision: http://reviews.llvm.org/D21744

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275259 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix missing whitespace in sphinx doc
Etienne Bergeron [Wed, 13 Jul 2016 06:37:39 +0000 (06:37 +0000)]
fix missing whitespace in sphinx doc

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275256 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCodeGen: minor cleanup, NFC
Saleem Abdulrasool [Wed, 13 Jul 2016 02:58:44 +0000 (02:58 +0000)]
CodeGen: minor cleanup, NFC

Initialise more members in initializer lists.  Invert the condition that had
grown to be pretty confusing.  The `_objc_empty_vtable` is only used on macOS
<10.9.  This simplifies the code.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275241 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] Use the multi-element remove function in EraseUnwantedCUDAMatches.
Justin Lebar [Tue, 12 Jul 2016 23:23:13 +0000 (23:23 +0000)]
[CUDA] Use the multi-element remove function in EraseUnwantedCUDAMatches.

Summary:
Bug pointed out by Benjamin Kramer in r264008.  I think the bug is
benign because by the time this is called, we should only have at most
two overloads to consider (either a host and a device overload, or a
host+device overload, but not all three).

Reviewers: tra

Subscribers: cfe-commits, bkramer

Differential Revision: http://reviews.llvm.org/D21914

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275233 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] Add additional testcases for EraseUnwantedCUDAMatches.
Justin Lebar [Tue, 12 Jul 2016 23:23:12 +0000 (23:23 +0000)]
[CUDA] Add additional testcases for EraseUnwantedCUDAMatches.

Summary:
Specifically, this patch adds testcases for all three calls to
EraseUnwantedCUDAMatches.  The addr-of-overloaded-fn test I accidentally
neutered in r264207, which moved much of
CodeGenCUDA/function-overload.cu into SemaCUDA/function-overload.cu.
The coverage from overloaded-delete test is new.

Reviewers: tra

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D21913

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275232 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] Don't assume that destructors can't be overloaded.
Justin Lebar [Tue, 12 Jul 2016 23:23:01 +0000 (23:23 +0000)]
[CUDA] Don't assume that destructors can't be overloaded.

Summary:
You can overload a destructor in CUDA, and SemaOverload needs to be
tweaked not to crash when it sees an explicit call to an overloaded
destructor.

Reviewers: rsmith

Subscribers: cfe-commits, tra

Differential Revision: http://reviews.llvm.org/D21912

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275231 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64: fix return type of vqmovun_high_*.
Tim Northover [Tue, 12 Jul 2016 17:38:50 +0000 (17:38 +0000)]
AArch64: fix return type of vqmovun_high_*.

These should be returning an unsigned quantity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275195 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix for the mingw builder
David Majnemer [Tue, 12 Jul 2016 16:56:33 +0000 (16:56 +0000)]
Fix for the mingw builder

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275191 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ItaniumMangle] Correctly mangle BuiltinTemplateDecls
David Majnemer [Tue, 12 Jul 2016 16:48:17 +0000 (16:48 +0000)]
[ItaniumMangle] Correctly mangle BuiltinTemplateDecls

A BuiltinTemplateDecl has no underlying templated decl and as such they
cannot be relied upon for mangling.  The ItaniumMangler had some bugs
here which lead to crashes.

This fixes PR28519.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275190 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoclang-format: [JS] Allow top-level conditionals again.
Daniel Jasper [Tue, 12 Jul 2016 15:45:53 +0000 (15:45 +0000)]
clang-format: [JS] Allow top-level conditionals again.

I am not sure exactly which test breakage Martin was trying to fix in
r273694. For now, fix the behavior for top-level conditionals, which
(surprisingly) are actually used somewhat commonly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275183 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Clang][AVX512] Making cosmetic changes
Michael Zuckerman [Tue, 12 Jul 2016 12:42:27 +0000 (12:42 +0000)]
[Clang][AVX512] Making cosmetic changes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275169 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ASTMatchers] isSignedInteger() and isUnsignedInteger()
Clement Courbet [Tue, 12 Jul 2016 06:36:00 +0000 (06:36 +0000)]
[ASTMatchers] isSignedInteger() and isUnsignedInteger()

Complementary to isInteger(), these match signed and unsigned integers
respectively.

Review: http://reviews.llvm.org/D21989

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275157 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MS ABI] Support throwing/catching __unaligned types
David Majnemer [Tue, 12 Jul 2016 04:42:50 +0000 (04:42 +0000)]
[MS ABI] Support throwing/catching __unaligned types

We need to mark the appropriate bits in ThrowInfo and HandlerType so
that the personality routine can correctly handle qualification
conversions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275154 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCorrecting the previous fix for test submitted with r275115.
Wolfgang Pieb [Mon, 11 Jul 2016 23:27:19 +0000 (23:27 +0000)]
Correcting the previous fix for test submitted with r275115.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275128 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix test submitted with r275115 (failed on ppc64 buildbots).
Wolfgang Pieb [Mon, 11 Jul 2016 23:20:28 +0000 (23:20 +0000)]
Fix test submitted with r275115 (failed on ppc64 buildbots).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275127 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Coverage] Do not map regions from system headers
Vedant Kumar [Mon, 11 Jul 2016 22:57:46 +0000 (22:57 +0000)]
[Coverage] Do not map regions from system headers

Do not assign source regions located within system headers file ID's,
and do not construct counter mapping regions out of them.

This makes coverage reports less cluttered and less mysterious. E.g
using the "assert" macro doesn't cause assert.h to appear in reports,
and it no longer shows the "assertion failed" branch as an uncovered
region.

It also makes coverage mapping sections a bit smaller (e.g a 1%
reduction in a stage2 build of bin/llvm-as).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275121 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Coverage] Move logic to skip decl's into a helper (NFC)
Vedant Kumar [Mon, 11 Jul 2016 22:57:44 +0000 (22:57 +0000)]
[Coverage] Move logic to skip decl's into a helper (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275120 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoPrevent the creation of empty (forwarding) blocks resulting from nested ifs.
Wolfgang Pieb [Mon, 11 Jul 2016 22:22:23 +0000 (22:22 +0000)]
Prevent the creation of empty (forwarding) blocks resulting from nested ifs.

Summary:
Nested if statements can generate empty BBs whose terminator branches
unconditionally to its successor. These branches are not eliminated
to help generate better line number information in some cases, but there
is no reason to keep the empty blocks that result from nested ifs.

Reviewers: mehdi_amini, dblaikie, echristo

Subscribers: mehdi_amini, cfe-commits

Differential review: http://reviews.llvm.org/D11360

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275115 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[NFC] Reorder fields of VersionTuple to reduce size
Erik Pilkington [Mon, 11 Jul 2016 20:00:48 +0000 (20:00 +0000)]
[NFC] Reorder fields of VersionTuple to reduce size

Differential revision: http://reviews.llvm.org/D19934

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275095 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Sema] Don't artificially forbid BuiltinTemplateDecls in CheckTemplateArgument
David Majnemer [Mon, 11 Jul 2016 17:09:56 +0000 (17:09 +0000)]
[Sema] Don't artificially forbid BuiltinTemplateDecls in CheckTemplateArgument

After thinking about it, we don't really need to forbid
BuiltinTemplateDecls explicitly.  The restriction doesn't really buy us
anything.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275078 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[man page] Document -gline-tables-only in the clang man page.
Adrian Prantl [Mon, 11 Jul 2016 17:03:16 +0000 (17:03 +0000)]
[man page] Document -gline-tables-only in the clang man page.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275076 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[man page] Fix two sphinx build errors.
Adrian Prantl [Mon, 11 Jul 2016 17:03:13 +0000 (17:03 +0000)]
[man page] Fix two sphinx build errors.
These options were referenced by other paragraphs, but never specified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275075 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMake tooling::applyAllReplacements return llvm::Expected<string> instead of empty...
Eric Liu [Mon, 11 Jul 2016 13:53:12 +0000 (13:53 +0000)]
Make tooling::applyAllReplacements return llvm::Expected<string> instead of empty string to indicate potential error.

Summary:
return llvm::Expected<> to carry error status and error information.
This is the first step towards introducing "Error" into tooling::Replacements.

Reviewers: djasper, klimek

Subscribers: ioeric, klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D21601

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275062 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OpenCL] Improved diagnostics of OpenCL types.
Anastasia Stulova [Mon, 11 Jul 2016 13:46:02 +0000 (13:46 +0000)]
[OpenCL] Improved diagnostics of OpenCL types.

 - Changes diagnostics for Blocks to be implicitly
const qualified OpenCL v2.0 s6.12.5.

 - Added and unified diagnostics of some OpenCL special types:
blocks, images, samplers, pipes. These types are intended for use
with the OpenCL builtin functions only and, therefore, most regular
uses are not allowed including assignments, arithmetic operations,
pointer dereferencing, etc.

Review: http://reviews.llvm.org/D21989

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275061 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Replace masked AND/OR/XOR intrinsics with native code and remove the builtins.
Craig Topper [Mon, 11 Jul 2016 06:14:18 +0000 (06:14 +0000)]
[AVX512] Replace masked AND/OR/XOR intrinsics with native code and remove the builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275049 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Sema] Disallow __make_integer_seq from showing up in __make_integer_seq
David Majnemer [Mon, 11 Jul 2016 05:59:24 +0000 (05:59 +0000)]
[Sema] Disallow __make_integer_seq from showing up in __make_integer_seq

We hit over stringent asserts when trying to diagnose.  Loosen them as
appropriate.

This fixes PR28494.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275047 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert r275029 - Update Clang tests after adding inference for the returned argument...
Hal Finkel [Mon, 11 Jul 2016 04:52:07 +0000 (04:52 +0000)]
Revert r275029 - Update Clang tests after adding inference for the returned argument attribute

The associated backend change is causing miscompiles from the AArch64 backend.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275043 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeGen] Treat imported static local variables as declarations
David Majnemer [Mon, 11 Jul 2016 04:28:21 +0000 (04:28 +0000)]
[CodeGen] Treat imported static local variables as declarations

Imported variables cannot really be definitions for the purposes of
IR generation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275040 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReapply SVN r274797.
Saleem Abdulrasool [Sun, 10 Jul 2016 23:24:36 +0000 (23:24 +0000)]
Reapply SVN r274797.

Original Commit Message

    Driver: Stop linking to C++ when using sanitizers on Darwin

    Sanitizers on Darwin are built as dynamic libraries, not static libraries.
    Sanitizers will have their C++ dependency satisfied internally (LC_LOAD_DYLIB)
    in the libclang_rt dylib. As long as the sanitizers stay dynamic and not static,
    linking against C++ when enabling a sanitizer becomes over linkage.

    Patch by Dave Lee!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275032 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Export workitem builtins
Jan Vesely [Sun, 10 Jul 2016 22:38:04 +0000 (22:38 +0000)]
AMDGPU: Export workitem builtins

Reviewers: tstellardAMD

Differential Revision: http://reviews.llvm.org/D20299

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275030 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUpdate Clang tests after adding inference for the returned argument attribute
Hal Finkel [Sun, 10 Jul 2016 22:26:52 +0000 (22:26 +0000)]
Update Clang tests after adding inference for the returned argument attribute

Adjusting tests after r275027.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275029 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Remove masked shufps/shudpd builtins. These are all handled with __builtin_s...
Craig Topper [Sun, 10 Jul 2016 16:35:54 +0000 (16:35 +0000)]
[AVX512] Remove masked shufps/shudpd builtins. These are all handled with __builtin_shufflevector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275018 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Use __butilin_shufflevector for 512-bit shufps intrinsics.
Craig Topper [Sun, 10 Jul 2016 05:57:21 +0000 (05:57 +0000)]
[X86] Use __butilin_shufflevector for 512-bit shufps intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275012 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd CLANG_BUILD_TOOLS as a clang counterpart for LLVM_BUILD_TOOLS
Michael Gottesman [Sun, 10 Jul 2016 01:44:00 +0000 (01:44 +0000)]
Add CLANG_BUILD_TOOLS as a clang counterpart for LLVM_BUILD_TOOLS

LLVM_BUILD_TOOLS is a boolean variable that controls whether or not generated
targets for llvm tools are built by the "all" target. CLANG_BUILD_TOOLS is an
analogous variable for clang targets.

This is useful functionality for selectively disabling the building of clang
targets by default to speed up builds.

In terms of implementation, I just followed the model of LLVM's implementation
of this functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275006 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDelete dead code.
Sean Silva [Sun, 10 Jul 2016 00:57:52 +0000 (00:57 +0000)]
Delete dead code.

We were just setting DisableUnitAtATime to its default value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275005 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMove add_clang_* entry points from the main clang CMakeLists.txt to cmake/modules...
Michael Gottesman [Sat, 9 Jul 2016 21:58:40 +0000 (21:58 +0000)]
Move add_clang_* entry points from the main clang CMakeLists.txt to cmake/modules/AddClang.cmake.

This matches how LLVM has its cmake files organized and is cleaner than just
shoving this business logic into the main CMakeLists.txt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274992 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[clang-cl] Add support for /Zd
David Majnemer [Sat, 9 Jul 2016 21:49:16 +0000 (21:49 +0000)]
[clang-cl] Add support for /Zd

MASM (ML.exe and ML64.exe) and older versions of MSVC (CL.exe) support a
flag called /Zd which is more-or-less -gline-tables-only.

It seems nicer to support this flag instead of exposing
-gline-tables-only.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274991 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MS ABI] Some code cleanups
David Majnemer [Sat, 9 Jul 2016 19:26:25 +0000 (19:26 +0000)]
[MS ABI] Some code cleanups

Don't create unnecessary truncations if the result will not be used.
Also prefer preforming math before the truncation, it makes it a little
easier to reason about.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274984 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AST] Tighten up some bitfields
David Majnemer [Sat, 9 Jul 2016 19:26:19 +0000 (19:26 +0000)]
[AST] Tighten up some bitfields

Optimize the bitfield types to conserve space for the MSVC ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274983 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoclang-format: [JS] Sort imports case insensitive.
Martin Probst [Sat, 9 Jul 2016 15:11:18 +0000 (15:11 +0000)]
clang-format: [JS] Sort imports case insensitive.

Summary: ASCII case sorting does not help finding imported symbols quickly, and it is common to have e.g. class Foo and function fooFactory exported/imported from the same file.

Reviewers: djasper

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D22146

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274977 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoclang-format: [JS] support trailing commas in imports.
Martin Probst [Sat, 9 Jul 2016 15:09:22 +0000 (15:09 +0000)]
clang-format: [JS] support trailing commas in imports.

Reviewers: djasper

Subscribers: cfe-commits, klimek

Differential Revision: http://reviews.llvm.org/D22147

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274976 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[analyzer] Older version of GCC 4.7 crash on lambdas in default arguments.
Benjamin Kramer [Sat, 9 Jul 2016 12:16:58 +0000 (12:16 +0000)]
[analyzer] Older version of GCC 4.7 crash on lambdas in default arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274975 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[analyzer] Rewrite manual erase loop using remove_if.
Benjamin Kramer [Sat, 9 Jul 2016 11:16:56 +0000 (11:16 +0000)]
[analyzer] Rewrite manual erase loop using remove_if.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274974 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Use __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi to implement...
Craig Topper [Sat, 9 Jul 2016 05:30:41 +0000 (05:30 +0000)]
[X86] Use __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi to implement pextrw/pinsertw MMX intrinsics instead of trying to use native IR.

Without this we end up generating code that doesn't use mmx registers and probably doesn't work well with other mmx intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274968 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Uncomment the _mm_extract_ps test and add checks.
Craig Topper [Sat, 9 Jul 2016 04:38:17 +0000 (04:38 +0000)]
[X86] Uncomment the _mm_extract_ps test and add checks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274965 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCodeGen: tweak CFString section for COFF, ELF
Saleem Abdulrasool [Sat, 9 Jul 2016 01:59:51 +0000 (01:59 +0000)]
CodeGen: tweak CFString section for COFF, ELF

Place the structure data into `cfstring`.  This both isolates the structures to
permit coalescing in the future (by the linker) as well as ensures that it
doesnt get marked as read-only data.  The structures themselves are not
read-only, only the string contents.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274956 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTeach -ast-print to print constexpr variables.
Vassil Vassilev [Fri, 8 Jul 2016 21:09:08 +0000 (21:09 +0000)]
Teach -ast-print to print constexpr variables.

Patch reviewed by Richard Smith (D22168).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274930 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OpenCL] Add missing -cl-no-signed-zeros option into driver
Yaxun Liu [Fri, 8 Jul 2016 20:28:29 +0000 (20:28 +0000)]
[OpenCL] Add missing -cl-no-signed-zeros option into driver

Add OCL option -cl-no-signed-zeros to driver options.

Also added to opencl.cl testcases.

Patch by Aaron En Ye Shi.

Differential Revision: http://reviews.llvm.org/D22067

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274923 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix flag name in comment in cuda-version-check.cu.
Justin Lebar [Fri, 8 Jul 2016 17:59:24 +0000 (17:59 +0000)]
Fix flag name in comment in cuda-version-check.cu.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274897 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCFGTests: Update libdeps.
NAKAMURA Takumi [Fri, 8 Jul 2016 17:06:27 +0000 (17:06 +0000)]
CFGTests: Update libdeps.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274885 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoclang/unittests/Analysis/CFGTest.cpp: Appease msc targets with -fno-delayed-template...
NAKAMURA Takumi [Fri, 8 Jul 2016 16:52:36 +0000 (16:52 +0000)]
clang/unittests/Analysis/CFGTest.cpp: Appease msc targets with -fno-delayed-template-parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274879 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoExplicitly export symbols from the sample analyzer plugin
John Brawn [Fri, 8 Jul 2016 16:20:57 +0000 (16:20 +0000)]
Explicitly export symbols from the sample analyzer plugin

This is done so that it will work when built using MSVC if
LLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON.

Differential Revision: http://reviews.llvm.org/D21971

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274871 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDon't crash when printing auto variables.
Vassil Vassilev [Fri, 8 Jul 2016 16:04:22 +0000 (16:04 +0000)]
Don't crash when printing auto variables.

Patch by Axel Naumann!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274859 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OpenCL] Fix access qualifiers handling for typedefs
Alexey Bader [Fri, 8 Jul 2016 15:34:59 +0000 (15:34 +0000)]
[OpenCL] Fix access qualifiers handling for typedefs

OpenCL s6.6: "Access qualifier must be used with image object arguments
of kernels and of user-defined functions [...] If no qualifier is
provided, read_only is assumed".

This does not define the behavior for image types used in typedef
declaration, but following the spec logic, we should allow access
qualifiers specification in typedefs, e.g.:

  typedef write_only image1d_t img1d_wo;

Unlike cv-qualifiers, user cannot add access qualifier to a typedef
type, i.e. this is not allowed:

  typedef image1d_t img1d; // note: previously declared 'read_only' here
  void foo(write_only img1d im) {} // error: multiple access qualifier

Patch by Andrew Savonichev.
Reviewers: Anastasia Stulova.

Differential revision: http://reviews.llvm.org/D20948

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274858 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ASTMatchers] Add missing forEachArgumentWithParam() to code sample
Alexander Kornienko [Fri, 8 Jul 2016 10:51:00 +0000 (10:51 +0000)]
[ASTMatchers] Add missing forEachArgumentWithParam() to code sample

Reviewers: klimek

Subscribers: cfe-commits, klimek

Patch by Martin Boehme!

Differential Revision: http://reviews.llvm.org/D21799

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274835 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCFGBuilder: Fix crash when visiting a range-based for over a dependent type
Alexander Kornienko [Fri, 8 Jul 2016 10:50:51 +0000 (10:50 +0000)]
CFGBuilder: Fix crash when visiting a range-based for over a dependent type

Summary:
CFG generation is expected to fail in this case, but it should not crash.

Also added a test that reproduces the crash.

Reviewers: klimek

Subscribers: cfe-commits

Patch by Martin Boehme!

Differential Revision: http://reviews.llvm.org/D21895

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274834 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRecommit r274348 and r274349. The Windows failures should be fixed.
Vassil Vassilev [Fri, 8 Jul 2016 08:33:56 +0000 (08:33 +0000)]
Recommit r274348 and r274349. The Windows failures should be fixed.

Original commit message:
"Add postorder traversal support to the RecursiveASTVisitor.

This feature needs to be explicitly enabled by overriding shouldTraversePostOrder()
as it has performance drawbacks for the iterative Stmt-traversal.

Patch by Raphael Isemann!

Reviewed by Richard Smith and Benjamin Kramer."

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274830 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Remove dead builtins that don't exist in the backend intrinsic file and don...
Craig Topper [Fri, 8 Jul 2016 05:11:47 +0000 (05:11 +0000)]
[X86] Remove dead builtins that don't exist in the backend intrinsic file and don't have custom handling in CGBuiltins.cpp either.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274825 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeGen] Use llvm::Type::getVectorNumElements instead of casting to llvm::VectorType...
Craig Topper [Fri, 8 Jul 2016 02:17:35 +0000 (02:17 +0000)]
[CodeGen] Use llvm::Type::getVectorNumElements instead of casting to llvm::VectorType and calling getNumElements. This is equivalent and shorter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274823 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Reuse existing lambda and remove unnecessary argument from vector cmp builtin...
Craig Topper [Fri, 8 Jul 2016 01:57:24 +0000 (01:57 +0000)]
[X86] Reuse existing lambda and remove unnecessary argument from vector cmp builtin handling. NFC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274821 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Remove a couple calls to create V2F64 and V4F32 types for builtin handling...
Craig Topper [Fri, 8 Jul 2016 01:48:44 +0000 (01:48 +0000)]
[X86] Remove a couple calls to create V2F64 and V4F32 types for builtin handling. Just get the type from the operand of the builtin instead. NFC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274820 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[analyzer] Add rudimentary handling of AtomicExpr.
Devin Coughlin [Fri, 8 Jul 2016 00:53:18 +0000 (00:53 +0000)]
[analyzer] Add rudimentary handling of AtomicExpr.

This proposed patch adds crude handling of atomics to the static analyzer.
Rather than ignore AtomicExprs, as we now do, this patch causes the analyzer
to escape the arguments. This is imprecise -- and we should model the
expressions fully in the future -- but it is less wrong than ignoring their
effects altogether.

This is rdar://problem/25353187

Differential Revision: http://reviews.llvm.org/D21667

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274816 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Driver: Stop linking to C++ when using sanitizers on Darwin"
Saleem Abdulrasool [Fri, 8 Jul 2016 00:37:31 +0000 (00:37 +0000)]
Revert "Driver: Stop linking to C++ when using sanitizers on Darwin"

This reverts SVN r274797.  It broke the Green Dragon bot.  Revert it until the
failure can be addressed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274814 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] Pass correct option in test.
Michael Kuperstein [Thu, 7 Jul 2016 23:22:39 +0000 (23:22 +0000)]
[CUDA] Pass correct option in test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274805 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Lex] Speed up updateConsecutiveMacroArgTokens (NFC)
Vedant Kumar [Thu, 7 Jul 2016 22:38:29 +0000 (22:38 +0000)]
[Lex] Speed up updateConsecutiveMacroArgTokens (NFC)

SM.isWrittenInSameFile() calls getFileID(), which can be expensive.
Move this check behind some cheaper filters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274800 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUpdate switch statement to match coding standards.
Simon Pilgrim [Thu, 7 Jul 2016 22:32:26 +0000 (22:32 +0000)]
Update switch statement to match coding standards.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274799 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDriver: Stop linking to C++ when using sanitizers on Darwin
Saleem Abdulrasool [Thu, 7 Jul 2016 21:42:29 +0000 (21:42 +0000)]
Driver: Stop linking to C++ when using sanitizers on Darwin

Sanitizers on Darwin are built as dynamic libraries, not static libraries.
Sanitizers will have their C++ dependency satisfied internally (LC_LOAD_DYLIB)
in the libclang_rt dylib. As long as the sanitizers stay dynamic and not static,
linking against C++ when enabling a sanitizer becomes over linkage.

Patch by Dave Lee!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274797 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AArch64] Change the preferred alignment for char and short.
Chad Rosier [Thu, 7 Jul 2016 20:02:25 +0000 (20:02 +0000)]
[AArch64] Change the preferred alignment for char and short.

This reinstates commits r273280 and r273289.

Original Review: http://reviews.llvm.org/D21414.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274791 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] s/OPT_nocuda_version_chec/OPT_no_cuda_version_check/.
Justin Lebar [Thu, 7 Jul 2016 18:24:28 +0000 (18:24 +0000)]
[CUDA] s/OPT_nocuda_version_chec/OPT_no_cuda_version_check/.

Fix build breakage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274782 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] Check that our CUDA install supports the requested architectures.
Justin Lebar [Thu, 7 Jul 2016 18:17:52 +0000 (18:17 +0000)]
[CUDA] Check that our CUDA install supports the requested architectures.

Summary:
Raise an error if you're using a CUDA installation that's too old for
the requested architectures.  In practice, this means that you need a
CUDA 8 install to compile for sm_6*.

Reviewers: tra

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D21869

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274781 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] Rename the __nvvm_bar0 builtin back to __syncthreads.
Justin Lebar [Thu, 7 Jul 2016 18:15:03 +0000 (18:15 +0000)]
[CUDA] Rename the __nvvm_bar0 builtin back to __syncthreads.

The builtin was renamed in r274770.  But __syncthreads is part of our
user-facing API, so we need to keep the name as-is.

Patch by Justin Bogner.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274780 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoNVPTX: Use the nvvm builtins to read SRegs rather than the legacy ptx ones
Justin Bogner [Thu, 7 Jul 2016 16:41:08 +0000 (16:41 +0000)]
NVPTX: Use the nvvm builtins to read SRegs rather than the legacy ptx ones

The ptx spellings were removed from LLVM in r274769.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274770 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[aarch64] Update datalayout for aarch64 tests"
Chad Rosier [Thu, 7 Jul 2016 16:37:21 +0000 (16:37 +0000)]
Revert "[aarch64] Update datalayout for aarch64 tests"

This reverts commit r273289, which was a follow to r273280, which was
reverted because the change was not properly approved.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274767 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[AArch64] Change the preferred alignment for char and short to word alignment"
Chad Rosier [Thu, 7 Jul 2016 16:37:19 +0000 (16:37 +0000)]
Revert "[AArch64] Change the preferred alignment for char and short to word alignment"

This reverts commit r273280 as the change was not properly approved.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274766 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix "not all control paths return a value" warning on MSVC
Simon Pilgrim [Thu, 7 Jul 2016 11:24:38 +0000 (11:24 +0000)]
Fix "not all control paths return a value" warning on MSVC

This time without causing a 'all enums handled' warning on other compilers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274748 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix "not all control paths return a value" warning on MSVC
Simon Pilgrim [Thu, 7 Jul 2016 11:12:02 +0000 (11:12 +0000)]
Fix "not all control paths return a value" warning on MSVC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274746 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OPENMP] Do not create helper expressions in dependent contexts, NFC.
Alexey Bataev [Thu, 7 Jul 2016 11:04:06 +0000 (11:04 +0000)]
[OPENMP] Do not create helper expressions in dependent contexts, NFC.

OpenMP relies on some helper expressions generated during semantic
analysis. But they are required only for codegen and not required in
dependent contexts. Patch removes generation of some of helper
expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274745 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AST] Tighten up the bitfield in TemplateSpecializationType
David Majnemer [Thu, 7 Jul 2016 04:43:11 +0000 (04:43 +0000)]
[AST] Tighten up the bitfield in TemplateSpecializationType

Optimize the bitfield types to conserve space for the MSVC ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274733 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AST] Use ArrayRef in more interfaces
David Majnemer [Thu, 7 Jul 2016 04:43:07 +0000 (04:43 +0000)]
[AST] Use ArrayRef in more interfaces

ArrayRef is a little better than passing around a pointer/length
pair.

No functional change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274732 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] Fix "control reaches end of non-void function" warnings in Cuda.cpp.
Justin Lebar [Thu, 7 Jul 2016 01:06:59 +0000 (01:06 +0000)]
[CUDA] Fix "control reaches end of non-void function" warnings in Cuda.cpp.

Some compilers are too dumb to realize that the switch statement covers
all cases.

(Don't use a "default" label, because we explicitly want to get a warning
if our switch doesn't cover all the cases.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274713 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Retry "Include debug info for nested structs and classes""
Adrian McCarthy [Wed, 6 Jul 2016 23:28:34 +0000 (23:28 +0000)]
Revert "Retry "Include debug info for nested structs and classes""

Reverting because it causes a test failure on build bots (Modules/ModuleDebugInfo.cpp).  Failure does not reproduce locally.

svn revision: rL274698

This reverts commit 3c5ed6599b086720aab5b8bd6941149d066806a6.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274706 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRetry "Include debug info for nested structs and classes"
Adrian McCarthy [Wed, 6 Jul 2016 22:39:15 +0000 (22:39 +0000)]
Retry "Include debug info for nested structs and classes"

This should work now that the LLVM-side of the change has landed successfully.

Original Differential Revision: http://reviews.llvm.org/D21705

This reverts commit a30322e861c387e1088f47065d0438c6bb019879.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274698 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoEnsuring the bit-fields have the same type; MSVC will place the fields in different...
Aaron Ballman [Wed, 6 Jul 2016 22:06:19 +0000 (22:06 +0000)]
Ensuring the bit-fields have the same type; MSVC will place the fields in different allocation units otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274695 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[analyzer] Suppress false positives in std::shared_ptr
Devin Coughlin [Wed, 6 Jul 2016 21:52:55 +0000 (21:52 +0000)]
[analyzer] Suppress false positives in std::shared_ptr

The analyzer does not model C++ temporary destructors completely and so
reports false alarms about leaks of memory allocated by the internals of
shared_ptr:

  std::shared_ptr<int> p(new int(1));
  p = nullptr; // 'Potential leak of memory pointed to by field __cntrl_'

This patch suppresses all diagnostics where the end of the path is inside
a method in std::shared_ptr.

It also reorganizes the tests for suppressions in the C++ standard library
to use a separate simulated header for library functions with bugs
that were deliberately inserted to test suppression. This will prevent
other tests from using these as models.

rdar://problem/23652766

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274691 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] Add missing namespace qualification on CudaArch in Action.cpp.
Justin Lebar [Wed, 6 Jul 2016 21:45:44 +0000 (21:45 +0000)]
[CUDA] Add missing namespace qualification on CudaArch in Action.cpp.

Fix build breakage with MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274689 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] Rename member variables in CudaInstallationDetector.
Justin Lebar [Wed, 6 Jul 2016 21:21:43 +0000 (21:21 +0000)]
[CUDA] Rename member variables in CudaInstallationDetector.

Summary:
Remove the "Cuda" prefix from these variables -- it's clear that they
related to CUDA given their containing type.

Reviewers: tra

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D21868

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274682 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] Add utility functions for dealing with CUDA versions / architectures.
Justin Lebar [Wed, 6 Jul 2016 21:21:39 +0000 (21:21 +0000)]
[CUDA] Add utility functions for dealing with CUDA versions / architectures.

Summary:
Currently our handling of CUDA architectures is scattered all around
clang.  This patch centralizes it.

A key advantage of this centralization is that you can now write a C++
switch on e.g. CudaArch and get a compile error if you don't handle one
of the enum values.

Reviewers: tra

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D21867

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274681 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] Add support for CUDA 8 and sm_60-62.
Justin Lebar [Wed, 6 Jul 2016 21:21:14 +0000 (21:21 +0000)]
[CUDA] Add support for CUDA 8 and sm_60-62.

Summary: Also add sm_32, which was missing.

Reviewers: tra

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D21778

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274680 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeGen, DebugInfo] Use hasLocalLinkage instead of hasInternalLinkage
David Majnemer [Wed, 6 Jul 2016 21:07:53 +0000 (21:07 +0000)]
[CodeGen, DebugInfo] Use hasLocalLinkage instead of hasInternalLinkage

For the purpose of emitting debug info, entities with private linkage
should be treated the same as internal linkage.  While this doesn't
change anything in practice, it makes the code a little less confusing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274677 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoNVPTX: Rename __builtin_ptx_shfl -> __nvvm_shfl
Justin Bogner [Wed, 6 Jul 2016 19:52:32 +0000 (19:52 +0000)]
NVPTX: Rename __builtin_ptx_shfl -> __nvvm_shfl

To match "NVPTX: Make the llvm.nvvm.shfl intrinsics and builtin names
consistent" in LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274663 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoEnsuring the bit-fields have the same type; MSVC will place the fields in different...
Aaron Ballman [Wed, 6 Jul 2016 18:33:01 +0000 (18:33 +0000)]
Ensuring the bit-fields have the same type; MSVC will place the fields in different allocation units otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274654 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd AST matchers for handling bit-fields and narrowing based on their width.
Aaron Ballman [Wed, 6 Jul 2016 18:25:16 +0000 (18:25 +0000)]
Add AST matchers for handling bit-fields and narrowing based on their width.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274652 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SemaExpr] Support assignments from vector to scalars with same size
Bruno Cardoso Lopes [Wed, 6 Jul 2016 18:05:23 +0000 (18:05 +0000)]
[SemaExpr] Support assignments from vector to scalars with same size

Before r266366, clang used to support constructs like:

  typedef __attribute__((vector_size(8))) double float64x1_t;
  typedef __attribute__((vector_size(16))) double float64x2_t;
  float64x1_t vget_low_f64(float64x2_t __p0);

  double y = 3.0 + vget_low_f64(v);

But it would reject:

  double y = vget_low_f64(v) + 3.0;

It also always rejected assignments:

  double y = vget_low_f64(v);

This patch: (a) revivies the behavior of `3.0 + vget_low_f64(v)` prior to
r266366, (b) add support for `vget_low_f64(v) + 3.0` and (c) add support for
assignments.

These vector semantics have never really been tied up but it seems
odd that we used to support some binop froms but do not support
assignment. If we did support scalar for the purposes of arithmetic, we
should probably be able to reinterpret as scalar for the purposes of
assignment too.

Differential Revision: http://reviews.llvm.org/D21700

rdar://problem/26093791

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274646 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Include debug info for nested structs and classes"
Adrian McCarthy [Wed, 6 Jul 2016 15:15:38 +0000 (15:15 +0000)]
Revert "Include debug info for nested structs and classes"

This reverts commit 0af5ee9631c7c167dc40498b415876553e314c95.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274633 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoInclude debug info for nested structs and classes
Adrian McCarthy [Wed, 6 Jul 2016 14:46:42 +0000 (14:46 +0000)]
Include debug info for nested structs and classes

This includes nested types in the member list, even if there are no members of that type. Note that structs and classes have themselves as an "implicit struct" as the first member, so we skip implicit ones.

Differential Revision: http://reviews.llvm.org/D21705

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274628 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd negative test for TBAA
Roger Ferrer Ibanez [Wed, 6 Jul 2016 07:13:49 +0000 (07:13 +0000)]
Add negative test for TBAA

Revision r178818 added tests for TBAA but was missing negative tests to ensure
that TBAA markers are not emitted when TBAA is off.

Differential Revision: http://reviews.llvm.org/D21295

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274610 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Use native IR for immediate values 0-7 of packed fp cmp builtins. This makes...
Craig Topper [Wed, 6 Jul 2016 06:27:31 +0000 (06:27 +0000)]
[X86] Use native IR for immediate values 0-7 of packed fp cmp builtins. This makes them the same as what is done when using the SSE builtins for these same encodings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274608 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OpenMP] Sema and parsing for 'distribute simd' pragma
Kelvin Li [Wed, 6 Jul 2016 04:45:38 +0000 (04:45 +0000)]
[OpenMP] Sema and parsing for 'distribute simd' pragma

Summary: This patch is an implementation of sema and parsing for the OpenMP composite pragma 'distribute simd'.

Differential Revision: http://reviews.llvm.org/D22007

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274604 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Use the generic ctlz intrinsic to implement the vplzcntd/q builtins.
Craig Topper [Wed, 6 Jul 2016 04:24:29 +0000 (04:24 +0000)]
[AVX512] Use the generic ctlz intrinsic to implement the vplzcntd/q builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274603 91177308-0d34-0410-b5e6-96231b3b80d8