]> granicus.if.org Git - clang/log
clang
8 years agoAdded calculateRangesAfterReplaments() to calculate affacted ranges in the new code.
Eric Liu [Tue, 21 Jun 2016 17:56:31 +0000 (17:56 +0000)]
Added calculateRangesAfterReplaments() to calculate affacted ranges in the new code.

Summary:
Added calculateRangesAfterReplaments() to calculate original ranges as well as
newly affacted ranges in the new code.

Reviewers: klimek, djasper

Subscribers: cfe-commits, klimek

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

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

8 years ago[aarch64] Update datalayout for aarch64 tests
Artem Belevich [Tue, 21 Jun 2016 17:35:31 +0000 (17:35 +0000)]
[aarch64] Update datalayout for aarch64 tests

This brings the tests in sync with the changes in r273280.

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

8 years agoclang-format: [JS] Add a Closure Compiler JSDoc tags to the default
Daniel Jasper [Tue, 21 Jun 2016 17:00:20 +0000 (17:00 +0000)]
clang-format: [JS] Add a Closure Compiler JSDoc tags to the default
Google configuration so that it isn't line-wrapped.

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

8 years agoAdd documentation for RenderScript changes
Pirama Arumuga Nainar [Tue, 21 Jun 2016 16:09:30 +0000 (16:09 +0000)]
Add documentation for RenderScript changes

Summary:
- Document the new 'kernel' attribute
- Mention RenderScript support in the Release Notes.

Reviewers: rsmith

Subscribers: tberghammer, danalbert, cfe-commits, srhines

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

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

8 years ago[AArch64] Change the preferred alignment for char and short to word alignment
Evandro Menezes [Tue, 21 Jun 2016 15:55:29 +0000 (15:55 +0000)]
[AArch64] Change the preferred alignment for char and short to word alignment

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

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

8 years ago[AVX512] Move the 128-bit and 256-bit lzcnt intrinsics to avx512vlcdintrin.h where...
Craig Topper [Tue, 21 Jun 2016 06:53:58 +0000 (06:53 +0000)]
[AVX512] Move the 128-bit and 256-bit lzcnt intrinsics to avx512vlcdintrin.h where they belong.

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

8 years agor273237 fixed PR28220, not PR28216
David Majnemer [Tue, 21 Jun 2016 03:43:11 +0000 (03:43 +0000)]
r273237 fixed PR28220, not PR28216

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

8 years ago[CodeGen] Do not run initializers for imported variables
David Majnemer [Tue, 21 Jun 2016 03:40:16 +0000 (03:40 +0000)]
[CodeGen] Do not run initializers for imported variables

The export side is responsible for running any initializers, they are
run when the module is first loaded.  Attempting to run an initializer
for the import side is not possible.

This fixes PR28216.

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

8 years ago[Docs] More warning fixes to unbreak the docs buildbot.
George Burgess IV [Tue, 21 Jun 2016 02:19:43 +0000 (02:19 +0000)]
[Docs] More warning fixes to unbreak the docs buildbot.

A number of warnings still remain, but these were the last of the
"unlexable code"-related ones (AFAICT).

I changed a few examples in docs/UsersManual.rst to showcase
-Wextra-tokens because it's already documented (-Wmultichar isn't), and
the sphinx C lexer apparently can't handle char literals like 'ab'. It
seemed like a better overall approach than just marking the code blocks
as none or console.

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

8 years agoclang/test/Headers/opencl-c-header.cl: Add explicit -triple x86_64-unknown to appease...
NAKAMURA Takumi [Tue, 21 Jun 2016 01:54:54 +0000 (01:54 +0000)]
clang/test/Headers/opencl-c-header.cl: Add explicit -triple x86_64-unknown to appease *-win32 targets.

  <stdin>:9:25: note: possible intended match here
   %call = tail call i8 @"\01?convert_char_rte@@$$J0YADD@Z"(i8 %x) #2
                          ^

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

8 years ago[Docs] Try to fix the docs buildbot.
George Burgess IV [Tue, 21 Jun 2016 00:16:23 +0000 (00:16 +0000)]
[Docs] Try to fix the docs buildbot.

It's complaining that it couldn't lex a compiler warning as C++. I don't
blame it.

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

8 years agoAdd a ENABLE_X86_RELAX_RELOCATIONS cmake option.
Rafael Espindola [Mon, 20 Jun 2016 23:54:44 +0000 (23:54 +0000)]
Add a ENABLE_X86_RELAX_RELOCATIONS  cmake option.

This corresponds to binutils' --enable-x86-relax-relocations.

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

8 years agoRemove MaxFunctionCount module flag annotation.
Easwaran Raman [Mon, 20 Jun 2016 20:48:32 +0000 (20:48 +0000)]
Remove MaxFunctionCount module flag annotation.

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

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

8 years agoclang-format: [Proto] Fix "import public" after r273179.
Daniel Jasper [Mon, 20 Jun 2016 20:39:53 +0000 (20:39 +0000)]
clang-format: [Proto] Fix "import public" after r273179.

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

8 years ago[Sema] Only define function as move assignment when needed
Erik Pilkington [Mon, 20 Jun 2016 20:04:15 +0000 (20:04 +0000)]
[Sema] Only define function as move assignment when needed

Fixes PR27941, a crash on invalid.

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

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

8 years ago[OpenCL] Include opencl-c.h by default as a clang module
Yaxun Liu [Mon, 20 Jun 2016 19:26:00 +0000 (19:26 +0000)]
[OpenCL] Include opencl-c.h by default as a clang module

Include opencl-c.h by default as a module to utilize the automatic AST caching mechanism of clang modules.

Add an option -finclude-default-header to enable default header for OpenCL, which is off by default.

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

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

8 years ago[OpenMP] Add the nowait clause to target update construct.
Kelvin Li [Mon, 20 Jun 2016 19:16:34 +0000 (19:16 +0000)]
[OpenMP] Add the nowait clause to target update construct.

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

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

8 years agoclang-format: [Proto] Don't do bad things if imports are missing ;.
Daniel Jasper [Mon, 20 Jun 2016 18:20:38 +0000 (18:20 +0000)]
clang-format: [Proto] Don't do bad things if imports are missing ;.

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

8 years agoUpdate for DiagnosticInfoStackSize changes
Matt Arsenault [Mon, 20 Jun 2016 18:13:09 +0000 (18:13 +0000)]
Update for DiagnosticInfoStackSize changes

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

8 years ago[modules] Allow emission of update records for predefined __va_list_tag.
Vassil Vassilev [Mon, 20 Jun 2016 15:10:40 +0000 (15:10 +0000)]
[modules] Allow emission of update records for predefined __va_list_tag.

Handles the cases where old __va_list_tag is coming from a module and the new
is not, needing an update record.

Fixes https://llvm.org/bugs/show_bug.cgi?id=27890

Patch by Cristina Cristescu, Richard Smith and me.

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

8 years agoMake test less sensitive to the resource directory.
Paul Robinson [Mon, 20 Jun 2016 14:33:49 +0000 (14:33 +0000)]
Make test less sensitive to the resource directory.
Same tactic as linux-header-search.cpp and android-ndk-standalone.cpp.

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

8 years agoAdd -fsyntax-only to Driver/opencl.cl test.
Cong Liu [Mon, 20 Jun 2016 11:25:26 +0000 (11:25 +0000)]
Add -fsyntax-only to Driver/opencl.cl test.

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

8 years ago[X86] Add -mno-iamcu option.
Andrey Turetskiy [Mon, 20 Jun 2016 10:31:39 +0000 (10:31 +0000)]
[X86] Add -mno-iamcu option.

Add -mno-iamcu option to:
  1) Countervail -miamcu option easily
  2) Be compatible with GCC which supports this option

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

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

8 years agoRevert "Make test less sensitive to the resource directory."
Paul Robinson [Sun, 19 Jun 2016 01:14:35 +0000 (01:14 +0000)]
Revert "Make test less sensitive to the resource directory."
Will need to try this on an actual Windows system.

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

8 years agoMake test less sensitive to the resource directory.
Paul Robinson [Sat, 18 Jun 2016 23:26:37 +0000 (23:26 +0000)]
Make test less sensitive to the resource directory.
Like linux-header-search.cpp and android-ndk-standalone.cpp.

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

8 years ago[X86] _MM_ALIGN16 attribute support for non-windows targets
Zvi Rackover [Sat, 18 Jun 2016 20:01:07 +0000 (20:01 +0000)]
[X86]  _MM_ALIGN16 attribute support for non-windows targets

Summary:
This patch adds support for the _MM_ALIGN16 attribute on non-windows targets. This aligns Clang with ICC which supports the attribute on all targets.

Fixes PR28056

Reviewers: aaboud, echristo, cfe-commits, mkuper

Subscribers: zvi, mehdi_amini

Projects: #clang-c

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

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

8 years ago[X86][XOP] Refreshed builtin tests ready for creation of llvm fast-isel tests
Simon Pilgrim [Sat, 18 Jun 2016 18:20:14 +0000 (18:20 +0000)]
[X86][XOP] Refreshed builtin tests ready for creation of llvm fast-isel tests

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

8 years ago[X86][TBM] Refreshed builtin tests ready for creation of llvm fast-isel tests
Simon Pilgrim [Sat, 18 Jun 2016 17:09:40 +0000 (17:09 +0000)]
[X86][TBM] Refreshed builtin tests ready for creation of llvm fast-isel tests

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

8 years ago[MS] Put member pointer representation flags in our debug info
Reid Kleckner [Fri, 17 Jun 2016 22:27:59 +0000 (22:27 +0000)]
[MS] Put member pointer representation flags in our debug info

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

8 years ago[Coverage] Adopt llvm::coverage::encodeFilenamesAndRawMappings (NFC)
Vedant Kumar [Fri, 17 Jun 2016 21:53:55 +0000 (21:53 +0000)]
[Coverage] Adopt llvm::coverage::encodeFilenamesAndRawMappings (NFC)

Use an llvm helper function to encode filenames and raw mappings.

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

8 years agotest: support / and \ as directory separators
Saleem Abdulrasool [Fri, 17 Jun 2016 19:59:01 +0000 (19:59 +0000)]
test: support / and \ as directory separators

Windows uses \ as the directory separator and this causes the tests to fail on
Windows.

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

8 years agoNVPTX: Add supported CL features
Jan Vesely [Fri, 17 Jun 2016 19:02:14 +0000 (19:02 +0000)]
NVPTX: Add supported CL features

Fixes libclc compilation broken by r269670

Reviewers: jholewinsky

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

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

8 years ago[CodeGen] Use pointer-sized integers for ptrtoint sources
David Majnemer [Fri, 17 Jun 2016 17:47:24 +0000 (17:47 +0000)]
[CodeGen] Use pointer-sized integers for ptrtoint sources

Given something like:
void *v = (void *)100;

We need to synthesize a ptrtoint operation from 100.  During constant
emission, we choose i64 as the type for our constant because it
guaranteed not to drop any bits from our CharUnits representation of the
value.  However, this is suboptimal for 32-bit targets: LLVM passes like
GlobalOpt will get confused by these sorts of casts resulting in
pessimization.

Instead, make sure the ptrtoint operand has a pointer-sized integer
type.

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

8 years agotest: generalise the matching
Saleem Abdulrasool [Fri, 17 Jun 2016 17:33:36 +0000 (17:33 +0000)]
test: generalise the matching

Use a regex for the clang version as that will change all the time.

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

8 years agoDriver: introduce and use `-isystem-after` for cross-windows
Saleem Abdulrasool [Fri, 17 Jun 2016 17:23:16 +0000 (17:23 +0000)]
Driver: introduce and use `-isystem-after` for cross-windows

This mirrors the many other -i*after options to insert a new system search
directory at the end of the search path.  This makes it possible to actually
inject a search path after the resource dir.  This option is similar in spirit
to the /imsvc option in the clang-cl driver.  This is needed to properly use the
driver for Windows targets where the clang headers wrap some of the system
headers.

This concept is actually useful on other targets (e.g. Linux) and would be
really easy to support on the core toolchain.

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

8 years ago[OpenCL] Allow -std={cl|CL}{|1.1|1.2|2.0} in driver
Yaxun Liu [Fri, 17 Jun 2016 17:19:28 +0000 (17:19 +0000)]
[OpenCL] Allow -std={cl|CL}{|1.1|1.2|2.0} in driver

Fix a regression which forbids using -std=cl|CL1.1|CL1.2|CL2.0 in driver.

Allow -std and -cl-std={cl|CL}{|1.1|1.2|2.0}.

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

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

8 years ago[Driver] Adapt Linux::GCCVersion::Parse to match GCC 5 installations
Bryan Chan [Fri, 17 Jun 2016 16:47:14 +0000 (16:47 +0000)]
[Driver] Adapt Linux::GCCVersion::Parse to match GCC 5 installations

Summary:
Some GCC 5 installations store the libstdc++ includes and GCC-specific files in paths without
the minor part of the version number, such as

  /usr/include/c++/5
  /usr/lib64/gcc/x86_64-suse-linux/5

Reviewers: cfe-commits, thiagomacieira, jroelofs

Subscribers: tinti, jroelofs

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

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

8 years ago[codeview] Stop emitting fully qualified subprogram display names
Reid Kleckner [Fri, 17 Jun 2016 16:11:20 +0000 (16:11 +0000)]
[codeview] Stop emitting fully qualified subprogram display names

This effectively reverts r255744, and leaves the printing option tweaks.

We can add the name qualifiers easily in the backend.

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

8 years ago[X86][SSE4A] Use native IR for mask movntsd/movntss intrinsics.
Simon Pilgrim [Fri, 17 Jun 2016 14:28:16 +0000 (14:28 +0000)]
[X86][SSE4A] Use native IR for mask movntsd/movntss intrinsics.

Depends on llvm side commit r273002.

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

8 years agoAMDGPU: Fix supported CL features
Jan Vesely [Fri, 17 Jun 2016 02:25:03 +0000 (02:25 +0000)]
AMDGPU: Fix supported CL features

Reviewers: arsenm

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

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

8 years agoToolingTests/runToolOnCode.TestSkipFunctionBody: Appease msc targets.
NAKAMURA Takumi [Fri, 17 Jun 2016 02:04:51 +0000 (02:04 +0000)]
ToolingTests/runToolOnCode.TestSkipFunctionBody: Appease msc targets.

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

8 years ago[ARM] Add mrrc/mrrc2 intrinsics and update existing mcrr/mcrr2 intrinsics.
Ranjeet Singh [Fri, 17 Jun 2016 00:59:41 +0000 (00:59 +0000)]
[ARM] Add mrrc/mrrc2 intrinsics and update existing mcrr/mcrr2 intrinsics.

Reapplying patch in r272777 which was reverted
because the llvm patch which added support
for generating the mcrr/mcrr2 instructions
from the intrinsic was causing an assertion
failure. This has now been fixed in llvm.

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

8 years agoHeaders: wordsmith error message
Saleem Abdulrasool [Fri, 17 Jun 2016 00:27:02 +0000 (00:27 +0000)]
Headers: wordsmith error message

Use the marketing name for the MSVC release as pointed out by Nico Weber!

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

8 years ago[CodeGen] Fix a segfault caused by pass_object_size.
George Burgess IV [Thu, 16 Jun 2016 23:06:04 +0000 (23:06 +0000)]
[CodeGen] Fix a segfault caused by pass_object_size.

This patch fixes a bug where we'd segfault (in some cases) if we saw a
variadic function with one or more pass_object_size arguments.

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

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

8 years agoFix a few issues while skipping function bodies
Olivier Goffart [Thu, 16 Jun 2016 21:40:06 +0000 (21:40 +0000)]
Fix a few issues while skipping function bodies

 - In functions with try { } catch { }, only the try block would be
   skipped, not the catch blocks

 - The template functions would still be parsed.

 - The initializers within a constructor would still be parsed.

 - The inline functions within class would still be stored, only to be
   discared later.

 - Invalid code with try would assert (as in "int foo() try assert_here")

This attempt to do even less while skipping function bodies.

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

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

8 years agoKeep invalid functions as part of the AST
Olivier Goffart [Thu, 16 Jun 2016 21:39:55 +0000 (21:39 +0000)]
Keep invalid functions as part of the AST

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

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

8 years agoFunctions declared in a scope should not hide previous declaration in earlier scopes
Olivier Goffart [Thu, 16 Jun 2016 21:39:46 +0000 (21:39 +0000)]
Functions declared in a scope should not hide previous declaration in earlier scopes

This code should be an error:

 void foo(int);
 void f3() {
   int foo(float);
   {
     float foo(int); // expected-error {{functions that differ only in their return type cannot be overloaded}}
   }
 }

the foo(float) function declared at function scope should not hide the float(int)
while trying to redeclare functions.

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

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

8 years agoMinor fixes for miamcpu-opt.c test
Artem Belevich [Thu, 16 Jun 2016 20:16:49 +0000 (20:16 +0000)]
Minor fixes for miamcpu-opt.c test

Added -no-canonical-prefixes to make cc1 binary name more predictable.
Added appropriate REQUIRES keywords.

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

8 years ago[DebugInfo] Put the vftable index in the debug info
Reid Kleckner [Thu, 16 Jun 2016 20:08:51 +0000 (20:08 +0000)]
[DebugInfo] Put the vftable index in the debug info

This won't always be enough info to call a virtual method from the
debugger, but it's a start.

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

8 years ago[x86] generate IR for AVX2 integer min/max builtins
Sanjay Patel [Thu, 16 Jun 2016 18:45:01 +0000 (18:45 +0000)]
[x86] generate IR for AVX2 integer min/max builtins
Sibling patch to r272932:
http://reviews.llvm.org/rL272932

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

8 years agoRe-apply r272900 - [OpenMP] Cast captures by copy when passed to fork call so that...
Samuel Antao [Thu, 16 Jun 2016 18:39:34 +0000 (18:39 +0000)]
Re-apply r272900 - [OpenMP] Cast captures by copy when passed to fork call so that they are compatible to what the runtime library expects.

An issue in one of the regression tests was fixed for 32-bit hosts.

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

8 years agoRevert r272900 - [OpenMP] Cast captures by copy when passed to fork call so that...
Samuel Antao [Thu, 16 Jun 2016 16:06:22 +0000 (16:06 +0000)]
Revert r272900 - [OpenMP] Cast captures by copy when passed to fork call so that they are compatible to what the runtime library expects.

Was causing trouble in one of the regression tests for a 32-bit address space.

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

8 years ago[OpenMP] Cast captures by copy when passed to fork call so that they are compatible...
Samuel Antao [Thu, 16 Jun 2016 15:09:31 +0000 (15:09 +0000)]
[OpenMP] Cast captures by copy when passed to fork call so that they are compatible to what the runtime library expects.

Summary:
This patch fixes an issue detected when firstprivate variables are passed to an OpenMP outlined function vararg list. Currently they are not compatible with what the runtime library expects causing malfunction in some targets.

This patch fixes the issue by moving the casting logic already in place for offloading to the common code that creates the outline function and arguments and updates the regression tests accordingly.

Reviewers: hfinkel, arpith-jacob, carlo.bertolli, kkwli0, ABataev

Subscribers: cfe-commits, caomhin

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

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

8 years ago[Builtin] Make __builtin_thread_pointer target-independent.
Marcin Koscielnicki [Thu, 16 Jun 2016 13:41:54 +0000 (13:41 +0000)]
[Builtin] Make __builtin_thread_pointer target-independent.

This is now supported for ARM, AArch64, PowerPC, SystemZ, SPARC, Mips.

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

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

8 years agoA follow-up fixing on cuda-march.cu: Don't match clang to other place.
Haojian Wu [Thu, 16 Jun 2016 13:27:02 +0000 (13:27 +0000)]
A follow-up fixing on cuda-march.cu: Don't match clang to other place.

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

8 years agoPatch "Compilation for Intel MCU (Part 2/3)" caused the clang-x64-ninja-win7
Andrey Turetskiy [Thu, 16 Jun 2016 12:26:20 +0000 (12:26 +0000)]
Patch "Compilation for Intel MCU (Part 2/3)" caused the clang-x64-ninja-win7
buildbot to fail because of inaccurate CHECK in the test. This is a quick fix
for the test to make it platform independent.

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

8 years agoCompilation for Intel MCU (Part 3/3)
Andrey Turetskiy [Thu, 16 Jun 2016 10:49:27 +0000 (10:49 +0000)]
Compilation for Intel MCU (Part 3/3)

This is the last patch required to support compilation for Intel MCU target (e.g. Intel(R) Quark(TM) micro controller D 2000).

When IAMCU triple is used:
 * Use IAMCU linker output format
 * Link with IAMCU crt objects
 * Link with IAMCU libraries

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

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

8 years agoCompilation for Intel MCU (Part 2/3)
Andrey Turetskiy [Thu, 16 Jun 2016 10:36:09 +0000 (10:36 +0000)]
Compilation for Intel MCU (Part 2/3)

This is the second patch required to support compilation for Intel MCU target (e.g. Intel(R) Quark(TM) micro controller D 2000).
When IAMCU triple is used:
 * Recognize and use IAMCU GCC toolchain
 * Set up include paths
 * Forbid C++

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

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

8 years agoclang/test/Driver/cuda-march.cu: Tweak not to match "clang" to other place like ...
NAKAMURA Takumi [Thu, 16 Jun 2016 06:08:09 +0000 (06:08 +0000)]
clang/test/Driver/cuda-march.cu: Tweak not to match "clang" to other place like "path-to-clang-foo".

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

8 years ago[Lex] Try to fix a 'comparison is always false' warning. NFC.
George Burgess IV [Thu, 16 Jun 2016 02:30:33 +0000 (02:30 +0000)]
[Lex] Try to fix a 'comparison is always false' warning. NFC.

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

8 years ago[DebugInfo] Enable generation of unique identifiers for externally visible MS ABI...
Reid Kleckner [Thu, 16 Jun 2016 01:21:28 +0000 (01:21 +0000)]
[DebugInfo] Enable generation of unique identifiers for externally visible MS ABI types

We implemented the mangling for this a long time ago.

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

8 years agoAllow 'nodebug' on local variables.
Paul Robinson [Thu, 16 Jun 2016 00:42:36 +0000 (00:42 +0000)]
Allow 'nodebug' on local variables.
Parameters and non-static members of aggregates are still excluded,
and probably should remain that way.

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

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

8 years ago[CUDA] Don't pass top-level -march down to device cc1 or ptxas.
Justin Lebar [Wed, 15 Jun 2016 23:46:11 +0000 (23:46 +0000)]
[CUDA] Don't pass top-level -march down to device cc1 or ptxas.

Summary:
Previously if you did e.g.

  $ clang -march=haswell -x cuda foo.cu

we would pass "-march=haswell -march=sm_20" down to the ptxas tool.
This causes it to assert, and rightly so!

Reviewers: tra

Subscribers: cfe-commits, echristo

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

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

8 years agoFix sanitizer-ld test.
Evgeniy Stepanov [Wed, 15 Jun 2016 23:29:26 +0000 (23:29 +0000)]
Fix sanitizer-ld test.

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

8 years agoFix linking of DFSan + coverage.
Evgeniy Stepanov [Wed, 15 Jun 2016 23:05:21 +0000 (23:05 +0000)]
Fix linking of DFSan + coverage.

Broken in r272717 because of no test coverage.

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

8 years ago[x86] translate SSE packed FP comparison builtins to IR
Sanjay Patel [Wed, 15 Jun 2016 21:20:04 +0000 (21:20 +0000)]
[x86] translate SSE packed FP comparison builtins to IR

As noted in the code comment, a potential follow-on would be to remove
the builtins themselves. Other than ord/unord, this already works as
expected. Eg:

  typedef float v4sf __attribute__((__vector_size__(16)));
  v4sf fcmpgt(v4sf a, v4sf b) { return a > b; }

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

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

8 years agoAdd support to clang-cl driver for /GS switch
Etienne Bergeron [Wed, 15 Jun 2016 20:34:33 +0000 (20:34 +0000)]
Add support to clang-cl driver for /GS switch

Summary:
This patch is adding command-line support for the MSVC buffer security check.

The buffer security check is turned on with the '/GS' compiler switch.
https://msdn.microsoft.com/en-us/library/8dbf701c.aspx

The MSVC buffer security check in implemented here:
http://reviews.llvm.org/D20346

Reviewers: hans, rnk

Subscribers: chrisha, cfe-commits, rnk, hans, thakis

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

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

8 years agoAdd a few Musl related tests that already pass.
Rafael Espindola [Wed, 15 Jun 2016 20:02:22 +0000 (20:02 +0000)]
Add a few Musl related tests that already pass.

Patch by Lei Zhang.

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

8 years agocc1_main: Do not print statistics twice in -disable_free mode.
Matthias Braun [Wed, 15 Jun 2016 19:24:55 +0000 (19:24 +0000)]
cc1_main: Do not print statistics twice in -disable_free mode.

llvm statistics are currently printed when the destructor of a "static
ManagedStatic<StatisticInfo> StatInfo" in llvm runs.  This destructor
currently runs in each case as part of llvm_shutdown() which is run even
in disable_free mode as part of main(). I assume that this hasn't always
been the case.

Removing the special code here avoids the statistics getting printed
twice.

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

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

8 years ago[x86] generate IR for SSE integer min/max builtins
Sanjay Patel [Wed, 15 Jun 2016 17:18:50 +0000 (17:18 +0000)]
[x86] generate IR for SSE integer min/max builtins
Sibling patch to r272806:
http://reviews.llvm.org/rL272806

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

8 years ago[Sparc] setjmp and longjmp intrinsic support update to add unit tests and remove...
Chris Dewhurst [Wed, 15 Jun 2016 16:08:13 +0000 (16:08 +0000)]
[Sparc] setjmp and longjmp intrinsic support update to add unit tests and remove accidentally checked-in code.

Related to revision r272782

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

8 years agoReverting r272777 because one of the tests
Ranjeet Singh [Wed, 15 Jun 2016 14:21:28 +0000 (14:21 +0000)]
Reverting r272777 because one of the tests
added in the llvm patch is causing an assertion
to fail.

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

8 years agoApply some suggestions from clang-tidy's performance-unnecessary-value-param.
Benjamin Kramer [Wed, 15 Jun 2016 14:20:56 +0000 (14:20 +0000)]
Apply some suggestions from clang-tidy's performance-unnecessary-value-param.

No functionality change intended.

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

8 years agoDon't use static variables in LambdaCapture
John Brawn [Wed, 15 Jun 2016 14:14:51 +0000 (14:14 +0000)]
Don't use static variables in LambdaCapture

When static variables are used in inline functions in header files anything that
uses that function ends up with a reference to the variable. Because
RecursiveASTVisitor uses the inline functions in LambdaCapture that use static
variables any AST plugin that uses RecursiveASTVisitor, such as the
PrintFunctionNames example, ends up with a reference to these variables. This is
bad on Windows when building with MSVC with LLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON
as variables used across a DLL boundary need to be explicitly dllimported in
the DLL using them.

This patch avoids that by adjusting LambdaCapture to be similar to before
r263921, with a capture of either 'this' or a VLA represented by a null Decl
pointer in DeclAndBits with an extra flag added to the bits to distinguish
between the two. This requires the use of an extra bit, and while Decl does
happen to be sufficiently aligned to allow this it's done in a way that means
PointerIntPair doesn't realise it and gives an assertion failure. Therefore I
also adjust Decl slightly to use LLVM_ALIGNAS to allow this.

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

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

8 years ago[AVX512] Use native IR for mask pcmpeq/pcmpgt intrinsics.
Craig Topper [Wed, 15 Jun 2016 14:06:34 +0000 (14:06 +0000)]
[AVX512] Use native IR for mask pcmpeq/pcmpgt intrinsics.

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

8 years ago[Sparc] Change to let clang know that setjmp and longjmp intrinsics are implemented...
Chris Dewhurst [Wed, 15 Jun 2016 12:44:47 +0000 (12:44 +0000)]
[Sparc] Change to let clang know that setjmp and longjmp intrinsics are implemented in the back-end.

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

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

8 years ago[ARM] Add mrrc/mrrc2 intrinsics and update existing mcrr/mcrr2 intrinsics.
Ranjeet Singh [Wed, 15 Jun 2016 11:32:18 +0000 (11:32 +0000)]
[ARM] Add mrrc/mrrc2 intrinsics and update existing mcrr/mcrr2 intrinsics.

Patch adds intrinsics for mrrc/mrrc2. The
intrinsics for mrrc/mrrc2 return a single
uint64_t to represent two 32 bit values.

The mcrr/mcrr2 intrinsic was changed to
accept a single uint64_t instead of two
32 bit values as the input for consistency.

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

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

8 years agoRevert accidential "[MSVC] Late parsing of in-class defined member functions in template"
Alexey Bataev [Wed, 15 Jun 2016 11:24:54 +0000 (11:24 +0000)]
Revert accidential "[MSVC] Late parsing of in-class defined member functions in template"

This reverts commit 0253605771b8bd9d414aba74fe2742c730d6fd1a.

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

8 years ago[OPENMP] Fix crash for 'schedule|dist_schedule' clauses during
Alexey Bataev [Wed, 15 Jun 2016 11:20:48 +0000 (11:20 +0000)]
[OPENMP] Fix crash for 'schedule|dist_schedule' clauses during
instantiation.

Added checks for non-dependent context when trygin to capture
non-constant schedule chunk expression for proper codegen of outlined
functions.

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

8 years ago[MSVC] Late parsing of in-class defined member functions in template
Alexey Bataev [Wed, 15 Jun 2016 11:19:39 +0000 (11:19 +0000)]
[MSVC] Late parsing of in-class defined member functions in template
classes.

MSVC actively uses unqualified lookup in dependent bases, lookup at the
instantiation point (non-dependent names may be resolved on things
declared later) etc. and all this stuff is the main cause of
incompatibility between clang and MSVC.

Clang tries to emulate MSVC behavior but it may fail in many cases.
clang could store lexed tokens for member functions definitions within
ClassTemplateDecl for later parsing during template instantiation.

It will allow resolving many possible issues with lookup in dependent
base classes and removing many already existing MSVC-specific
hacks/workarounds from the clang code.

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

8 years agoAdd a "declared 'nonnull' here" note to warnings where an expression is checked again...
Nick Lewycky [Wed, 15 Jun 2016 05:18:39 +0000 (05:18 +0000)]
Add a "declared 'nonnull' here" note to warnings where an expression is checked against null.

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

8 years agoHeaders: tweak for MSVC[<1800]
Saleem Abdulrasool [Wed, 15 Jun 2016 00:28:15 +0000 (00:28 +0000)]
Headers: tweak for MSVC[<1800]

Earlier versions of MSVC did not include inttypes.h.  Ensure that we dont try to
include_next on those releases.

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

8 years agoFix sanitizer coverage support in the win32 driver.
Evgeniy Stepanov [Tue, 14 Jun 2016 23:21:19 +0000 (23:21 +0000)]
Fix sanitizer coverage support in the win32 driver.

--dependent-lib arguments for the sanitizer libraries must be emitted when
coverage is enabled w/o any sanitizers.

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

8 years ago[OpenCL] Enable -fblocks by default for OpenCL 2.0 and above.
Yaxun Liu [Tue, 14 Jun 2016 21:43:01 +0000 (21:43 +0000)]
[OpenCL] Enable -fblocks by default for OpenCL 2.0 and above.

Reviewed as part of http://reviews.llvm.org/D20444

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

8 years ago[sanitizer] Allow sanitize coverage w/o sanitizers.
Evgeniy Stepanov [Tue, 14 Jun 2016 21:33:40 +0000 (21:33 +0000)]
[sanitizer] Allow sanitize coverage w/o sanitizers.

The reason is that this (a) seems to work just fine and (b) useful when building stuff with
sanitizer+coverage, but need to exclude the sanitizer for a particular source file.

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

8 years agoUpdate clang for D20348
Peter Collingbourne [Tue, 14 Jun 2016 21:02:05 +0000 (21:02 +0000)]
Update clang for D20348

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

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

8 years agos/Intrin.h/intrin.h/, trying to fix the build after r272701
Hans Wennborg [Tue, 14 Jun 2016 20:14:24 +0000 (20:14 +0000)]
s/Intrin.h/intrin.h/, trying to fix the build after r272701

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

8 years agoRename Intrin.h to intrin.h, that's how all the documentation calls it.
Nico Weber [Tue, 14 Jun 2016 19:54:40 +0000 (19:54 +0000)]
Rename Intrin.h to intrin.h, that's how all the documentation calls it.

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

8 years agoFix documentation bot after r272656
Adam Nemet [Tue, 14 Jun 2016 19:33:16 +0000 (19:33 +0000)]
Fix documentation bot after r272656

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

8 years ago[perf-training] Ignore 'Profile Note' warnings from the runtime
Vedant Kumar [Tue, 14 Jun 2016 19:06:48 +0000 (19:06 +0000)]
[perf-training] Ignore 'Profile Note' warnings from the runtime

After r272599, -DLLVM_BUILD_INSTRUMENTED passes a default argument to
-fprofile-instr-generate. This confuses the perf-helper script because
the runtime emits a note stating that the default is overridden by the
LLVM_PROFILE_FILE environment variable.

Change the perf-helper script s.t it does not treat these notes as
failures.

This isn't a strictly NFC change, but I don't see a simple way to add a
test for it.

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

8 years ago[clang-format] do not add existing includes.
Eric Liu [Tue, 14 Jun 2016 14:09:21 +0000 (14:09 +0000)]
[clang-format] do not add existing includes.

Summary: do not add existing includes.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

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

8 years agoclang-format: [JS] Fix failing format with TypeScript casts.
Daniel Jasper [Tue, 14 Jun 2016 13:54:38 +0000 (13:54 +0000)]
clang-format: [JS] Fix failing format with TypeScript casts.

Before, this could be formatted at all (with BracketAlignmentStyle
AlwaysBreak):

  foo = <Bar[]>[
    1, /* */
    2
  ];

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

8 years ago[Clang][avx512][Intrinsics] adding prefetch gather intrinsics
Michael Zuckerman [Tue, 14 Jun 2016 13:45:17 +0000 (13:45 +0000)]
[Clang][avx512][Intrinsics] adding prefetch gather intrinsics

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

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

8 years agoStart adding support for Musl.
Rafael Espindola [Tue, 14 Jun 2016 12:47:24 +0000 (12:47 +0000)]
Start adding support for Musl.

The two patches together enable clang to support targets like
"x86_64-pc-linux-musl" and build binaries against musl-libc instead of
glibc. This make it easy for clang to work on some musl-based systems
like Alpine Linux and certain flavors of Gentoo.

Patch by Lei Zhang.

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

8 years ago[Clang][AVX512][intrinsics] Adding missing intrinsics div_pd and div_ps
Michael Zuckerman [Tue, 14 Jun 2016 12:38:58 +0000 (12:38 +0000)]
[Clang][AVX512][intrinsics] Adding missing intrinsics div_pd and div_ps

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

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

8 years agoAdd loop pragma for Loop Distribution
Adam Nemet [Tue, 14 Jun 2016 12:04:26 +0000 (12:04 +0000)]
Add loop pragma for Loop Distribution

Summary:
This is similar to other loop pragmas like 'vectorize'.  Currently it
only has state values: distribute(enable) and distribute(disable).  When
one of these is specified the corresponding loop metadata is generated:

  !{!"llvm.loop.distribute.enable", i1 true/false}

As a result, loop distribution will be attempted on the loop even if
Loop Distribution in not enabled globally.  Analogously, with 'disable'
distribution can be turned off for an individual loop even when the pass
is otherwise enabled.

There are some slight differences compared to the existing loop pragmas.

1. There is no 'assume_safety' variant which makes its handling slightly
different from 'vectorize'/'interleave'.

2. Unlike the existing loop pragmas, it does not have a corresponding
numeric pragma like 'vectorize' -> 'vectorize_width'.  So for the
consistency checks in CheckForIncompatibleAttributes we don't need to
check it against other pragmas.  We just need to check for duplicates of
the same pragma.

Reviewers: rsmith, dexonsmith, aaron.ballman

Subscribers: bob.wilson, cfe-commits, hfinkel

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

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

8 years agoclang-format: [JS] Support annotated classes.
Daniel Jasper [Tue, 14 Jun 2016 11:28:02 +0000 (11:28 +0000)]
clang-format: [JS] Support annotated classes.

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

8 years agoReverting "Warn when taking address of a packed member"
Roger Ferrer Ibanez [Tue, 14 Jun 2016 11:20:07 +0000 (11:20 +0000)]
Reverting "Warn when taking address of a packed member"

This new diagnostic is causing some false positives that have to be addressed.

This reverts commit 272552

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

8 years ago[mips] Defer validity check for CPU/ABI pairs and improve error message for invalid...
Daniel Sanders [Tue, 14 Jun 2016 08:58:50 +0000 (08:58 +0000)]
[mips] Defer validity check for CPU/ABI pairs and improve error message for invalid cases.

Summary:
The validity of ABI/CPU pairs is no longer checked on the fly but is
instead checked after initialization. As a result, invalid CPU/ABI pairs
can be reported as being known but invalid instead of being unknown. For
example, we now emit:
  error: ABI 'n32' is not supported on CPU 'mips32r2'
instead of:
  error: unknown target ABI 'n64'

Reviewers: atanasyan

Subscribers: sdardis, cfe-commits

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

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

8 years agoFix PR28100 - Allow redeclarations of deleted explicit specializations.
Faisal Vali [Tue, 14 Jun 2016 03:23:15 +0000 (03:23 +0000)]
Fix PR28100 - Allow redeclarations of deleted explicit specializations.

See https://llvm.org/bugs/show_bug.cgi?id=28100.

In r266561 when I implemented allowing explicit specializations of function templates to override deleted status, I mistakenly assumed (and hence introduced a violable assertion) that when an explicit specialization was being declared, the corresponding specialization of the most specialized function template that it would get linked to would always be the one that was implicitly generated - and so if it was marked as 'deleted' it must have inherited it from the primary template and so should be safe to reset its deleted status, and set it to being an explicit specialization.  Obviously during redeclaration of a deleted explicit specialization, in order to avoid a recursive reset, we need to check that the previous specialization is not an explicit specialization (instead of assuming and asserting it) and that it hasn't been referenced, and so only then is it safe to reset its 'deleted' status.

All regression tests pass.

Thanks to Zhendong Su for reporting the bug and David Majnemer for tracking it to my commit r266561, and promptly bringing it to my attention.

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