]> granicus.if.org Git - clang/log
clang
8 years agoEmit more intrinsics for builtin functions
Matt Arsenault [Fri, 1 Jul 2016 17:38:14 +0000 (17:38 +0000)]
Emit more intrinsics for builtin functions

This is important for building libclc. Since r273039 tests are failing
due to now emitting calls to these functions instead of emitting the
DAG node. The libm function names are implemented for OpenCL, and should
call the locally defined versions, so -fno-builtin is used. The IR
Some functions use the __builtins and expect the intrinsics to be
emitted. Without this we end up with nobuiltin calls to intrinsics
or to unsupported library calls.

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

8 years agoRevert r274348 and r274349 until the Windows failures are fixed.
Vassil Vassilev [Fri, 1 Jul 2016 16:07:57 +0000 (16:07 +0000)]
Revert r274348 and r274349 until the Windows failures are fixed.

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

8 years agoDriver: support -L for MSVC toolchain under the GNU driver
Saleem Abdulrasool [Fri, 1 Jul 2016 15:36:31 +0000 (15:36 +0000)]
Driver: support -L for MSVC toolchain under the GNU driver

When not using clang in the CL emulation mode, honour the -L flags as additional
library paths to pass to the linker invocation.

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

8 years ago[OpenMP] Issue warning if a simd construct nested inside another simd
Kelvin Li [Fri, 1 Jul 2016 14:30:25 +0000 (14:30 +0000)]
[OpenMP] Issue warning if a simd construct nested inside another simd
construct

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

8 years agoAdd forgotten test to r274348.
Vassil Vassilev [Fri, 1 Jul 2016 13:30:08 +0000 (13:30 +0000)]
Add forgotten test to r274348.

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

8 years agoAdd postorder traversal support to the RecursiveASTVisitor.
Vassil Vassilev [Fri, 1 Jul 2016 13:28:31 +0000 (13:28 +0000)]
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@274348 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[DebugInfo] Set DISubprogram ThisAdjustment in the MS ABI
Reid Kleckner [Fri, 1 Jul 2016 02:41:25 +0000 (02:41 +0000)]
[DebugInfo] Set DISubprogram ThisAdjustment in the MS ABI

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

8 years ago[Feature] Add a builtin for indexing into parameter packs. Patch by Louis Dionne.
Eric Fiselier [Fri, 1 Jul 2016 01:24:09 +0000 (01:24 +0000)]
[Feature] Add a builtin for indexing into parameter packs. Patch by Louis Dionne.

This patch adds a __nth_element builtin that allows fetching the n-th type of a
parameter pack with very little compile-time overhead. The patch was inspired by
r252036 and r252115 by David Majnemer, which add a similar __make_integer_seq
builtin for efficiently creating a std::integer_sequence.

Reviewed as D15421. http://reviews.llvm.org/D15421

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

8 years ago[CodeCompletion] Allow system headers providing private symbols with a single underscore.
Argyrios Kyrtzidis [Fri, 1 Jul 2016 01:17:02 +0000 (01:17 +0000)]
[CodeCompletion] Allow system headers providing private symbols with a single underscore.

rdar://24677150

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

8 years ago[Sema] Implement C++14's DR1579: Prefer returning by converting move constructor
Erik Pilkington [Thu, 30 Jun 2016 23:09:13 +0000 (23:09 +0000)]
[Sema] Implement C++14's DR1579: Prefer returning by converting move constructor

Fixes PR28096.

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

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

8 years ago[OpenMP] Use fopenmp prefix for all options introduced by the offloading implementation.
Samuel Antao [Thu, 30 Jun 2016 21:22:08 +0000 (21:22 +0000)]
[OpenMP] Use fopenmp prefix for all options introduced by the offloading implementation.

Summary: This patch changes the options used by offloading to start with -fopenmp instead of -fomp. This makes the option naming more consistent and materializes a suggestion by Richard Smith in http://reviews.llvm.org/D9888.

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

Subscribers: kkwli0, cfe-commits, caomhin

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

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

8 years agofix typo; NFC
Sanjay Patel [Thu, 30 Jun 2016 21:02:40 +0000 (21:02 +0000)]
fix typo; NFC

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

8 years agoFix ASTMatchersNodeTest to work on Windows.
Justin Lebar [Thu, 30 Jun 2016 20:29:29 +0000 (20:29 +0000)]
Fix ASTMatchersNodeTest to work on Windows.

It was failing because it had an explicit check for whether we're on
Windows.

There are a few other similar explicit checks in this file which I
didn't remove because they serve as reasonable documentation that the
test doesn't work with a Windows triple.

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

8 years agoFix typo-correction crash if a typo occurs within the operand of a
Richard Smith [Thu, 30 Jun 2016 20:24:30 +0000 (20:24 +0000)]
Fix typo-correction crash if a typo occurs within the operand of a
function-style cast to a non-dependent type which is then used in an invalid
way. We'd lose the "type dependent" bit here, and downstream Sema processing
would then discard the expression if it was used in a context where its type
rendered it invalid.

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

8 years ago[CUDA] Give templated device functions internal linkage, templated kernels external...
Justin Lebar [Thu, 30 Jun 2016 18:41:33 +0000 (18:41 +0000)]
[CUDA] Give templated device functions internal linkage, templated kernels external linkage.

Summary:
This lets LLVM perform IPO over these functions.  In particular, it
allows LLVM to emit ld.global.nc for loads to __restrict pointers in
kernels that are never written to.

Reviewers: rsmith

Subscribers: cfe-commits, tra

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

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

8 years agoPR28373: fix crash-on-invalid if the condition of an if-statement fails typo-correction.
Richard Smith [Thu, 30 Jun 2016 18:36:34 +0000 (18:36 +0000)]
PR28373: fix crash-on-invalid if the condition of an if-statement fails typo-correction.

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

8 years agoDon't instantiate a full host toolchain in ASTMatchersTest.
Justin Lebar [Thu, 30 Jun 2016 18:12:25 +0000 (18:12 +0000)]
Don't instantiate a full host toolchain in ASTMatchersTest.

Summary:
This test was stat()'ing large swaths of /usr/lib hundreds of times, as
every invocation of matchesConditionally*() created a new Linux
toolchain.

In addition to being slow, perf indicated this was causing substantial
contention in the kernel.

Something is...interesting in the kernel, as without this patch I
sometimes see ~11m spent in the kernel, and sometimes ~5m.  This
corresponds to bimodal ninja check-clang times of ~30s and ~20s.

It's not clear to me exactly what causes the bimodality.  In any case,
this change makes this test run in 2.5s, down from 17s, and it seems to
cause us to get the 20s ninja check-clang time unconditionally.

Reviewers: chandlerc

Subscribers: cfe-commits, klimek

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

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

8 years ago[codeview] Emit qualified display names if -gline-tables-only is on
Reid Kleckner [Thu, 30 Jun 2016 17:41:31 +0000 (17:41 +0000)]
[codeview] Emit qualified display names if -gline-tables-only is on

When -gmlt is on, we don't emit namespace or class scope information,
and the CodeView emission code in LLVM can't compute the fully qualified
name. If we know LLVM won't be able to get the name right, go ahead and
emit the qualified name in the frontend.

We could change our -gmlt emission strategy to include those scopes when
emitting codeview, but that would increase memory usage and slow down
LTO and add more complexity to debug info emission.

The same problem exists when you debug a -gmlt binary with GDB, so we
should consider removing '&& EmitCodeView' from the condition here at
some point in the future after evaluating the impact on object file
size.

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

8 years agoPort some more debug info tests on Windows
Reid Kleckner [Thu, 30 Jun 2016 17:41:27 +0000 (17:41 +0000)]
Port some more debug info tests on Windows

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

8 years ago[AVX512][BUILTIN][vpermilps][intrinsics] Fixing two incorrect IMM check.
Michael Zuckerman [Thu, 30 Jun 2016 12:12:20 +0000 (12:12 +0000)]
[AVX512][BUILTIN][vpermilps][intrinsics] Fixing two incorrect IMM check.

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

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

8 years agoFix CodeGenCXX/mangle-abi-tag.cpp on clang-ppc64le-linux bot
Dmitry Polukhin [Thu, 30 Jun 2016 11:15:52 +0000 (11:15 +0000)]
Fix CodeGenCXX/mangle-abi-tag.cpp on clang-ppc64le-linux bot

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

8 years ago[GCC] PR23529 Mangler part of attrbute abi_tag support
Dmitry Polukhin [Thu, 30 Jun 2016 09:40:38 +0000 (09:40 +0000)]
[GCC] PR23529 Mangler part of attrbute abi_tag support

Original patch by Stefan Bühler http://reviews.llvm.org/D12834

Difference between original and this one:
- fixed all failing tests
- fixed mangling for global variable outside namespace
- emit ABI tags for guards and local names
- clang-format + other stylistic changes
- significantly reworked patch according to Richard's suggestions

Sema part, committed before http://reviews.llvm.org/D17567

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

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

8 years agoEnable opencl driver tests, which never ran.
Benjamin Kramer [Thu, 30 Jun 2016 09:17:46 +0000 (09:17 +0000)]
Enable opencl driver tests, which never ran.

Then mark it as XFAIL because it always fails. I'll let OpenCL people
figure this out.

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

8 years agoAMDGPU: Set amdgpu_kernel calling convention for OpenCL kernels.
Nikolay Haustov [Thu, 30 Jun 2016 09:06:33 +0000 (09:06 +0000)]
AMDGPU: Set amdgpu_kernel calling convention for OpenCL kernels.

Summary:
Summary:
Change Clang calling convention SpirKernel to OpenCLKernel.
Set calling convention OpenCLKernel for amdgcn as well.
Add virtual method .getOpenCLKernelCallingConv() to TargetCodeGenInfo
and use it to set target calling convention for AMDGPU and SPIR.
Update tests.

Reviewers: rsmith, tstellarAMD, Anastasia, yaxunl

Subscribers: kzhuravl, cfe-commits

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

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

8 years ago[Clang][Intrinsics][AVX512][BuiltIn] adding intrinsics for vrangesd instruction set
Michael Zuckerman [Thu, 30 Jun 2016 08:05:46 +0000 (08:05 +0000)]
[Clang][Intrinsics][AVX512][BuiltIn] adding intrinsics for vrangesd instruction set

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

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

8 years ago[ASTMatcher] Add a node matcher for EnumType.
Haojian Wu [Thu, 30 Jun 2016 07:50:01 +0000 (07:50 +0000)]
[ASTMatcher] Add a node matcher for EnumType.

Reviewers: aaron.ballman

Subscribers: cfe-commits, klimek

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

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

8 years ago[cmake] Remove stale comment. NFC.
Michael Gottesman [Thu, 30 Jun 2016 05:51:18 +0000 (05:51 +0000)]
[cmake] Remove stale comment. NFC.

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

8 years ago[MS ABI] Pick an inheritance model if we resolve an overload set
David Majnemer [Thu, 30 Jun 2016 03:02:03 +0000 (03:02 +0000)]
[MS ABI] Pick an inheritance model if we resolve an overload set

We didn't assign an inheritance model for 'Foo' if the event an
exrepssion like '&Foo::Bar' occured if 'Bar' could resolve to multiple
functions.

Once the overload set is resolved to a particular member, we enforce a
specific inheritance model.

This fixes PR28360.

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

8 years ago[CodeView] Implement support for bitfields in Clang
David Majnemer [Thu, 30 Jun 2016 03:01:59 +0000 (03:01 +0000)]
[CodeView] Implement support for bitfields in Clang

Emit the underlying storage offset in addition to the starting bit
position of the field.

This fixes PR28162.

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

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

8 years agoUse the same type for adjacent bit field members.
Akira Hatanaka [Thu, 30 Jun 2016 00:07:17 +0000 (00:07 +0000)]
Use the same type for adjacent bit field members.

MSVC doesn't pack the bit field members if different types are used.
This came up in a patch review.

http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160627/163107.html

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

8 years ago[Tooling] Add optional argument to getFullyQualifiedName to prepend "::".
Siva Chandra [Wed, 29 Jun 2016 22:38:59 +0000 (22:38 +0000)]
[Tooling] Add optional argument to getFullyQualifiedName to prepend "::".

Reviewers: rsmith, saugustine, rnk

Subscribers: klimek, cfe-commits

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

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

8 years ago[ClangConfig] Store all of the targets exported in the variable CLANG_EXPORTED_TARGETS.
Michael Gottesman [Wed, 29 Jun 2016 21:59:23 +0000 (21:59 +0000)]
[ClangConfig] Store all of the targets exported in the variable CLANG_EXPORTED_TARGETS.

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

8 years ago[ClangConfig] Unset some variables after we are done using them to configure ClangCon...
Michael Gottesman [Wed, 29 Jun 2016 21:59:20 +0000 (21:59 +0000)]
[ClangConfig] Unset some variables after we are done using them to configure ClangConfig.cmake.in files.

This ensures that the values do not bleed over in between computations. It may
make sense in the future to just refactor this code into functions to provide
"true scoping".

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

8 years ago[ClangConfig] Instead of hard coding the ClangTargets location to /ClangTargets.cmake...
Michael Gottesman [Wed, 29 Jun 2016 21:59:19 +0000 (21:59 +0000)]
[ClangConfig] Instead of hard coding the ClangTargets location to /ClangTargets.cmake, follow LLVM's example and use a pre-computed cmake variable @CLANG_CONFIG_EXPORTS_FILE@.

This just makes ClangConfig more consistent with LLVMConfig.

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

8 years ago[ClangConfig] Follow LLVM's example and only install Clang{Config,Target}.cmake when...
Michael Gottesman [Wed, 29 Jun 2016 21:59:15 +0000 (21:59 +0000)]
[ClangConfig] Follow LLVM's example and only install Clang{Config,Target}.cmake when LLVM_INSTALL_TOOLCHAIN_ONLY is disabled.

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

8 years ago[cmake] Instead of just copying ClangConfig.cmake, configure it using ClangConfig...
Michael Gottesman [Wed, 29 Jun 2016 21:59:14 +0000 (21:59 +0000)]
[cmake] Instead of just copying ClangConfig.cmake, configure it using ClangConfig.cmake.in.

This will allow for cmake to expand variables in ClangConfig.cmake for
downstream users.

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

8 years agoP0305R1: Parsing support for init-statements in 'if' and 'switch' statements.
Richard Smith [Wed, 29 Jun 2016 21:17:59 +0000 (21:17 +0000)]
P0305R1: Parsing support for init-statements in 'if' and 'switch' statements.
No semantic analysis yet.

This is a pain to disambiguate correctly, because the parsing rules for the
declaration form of a condition and of an init-statement are quite different --
for a token sequence that looks like a declaration, we frequently need to
disambiguate all the way to the ')' or ';'.

We could do better here in some cases by stopping disambiguation once we've
decided whether we've got an expression or not (rather than keeping going until
we know whether it's an init-statement declaration or a condition declaration),
by unifying our parsing code for the two types of declaration and moving the
syntactic checks into Sema; if this has a measurable impact on parsing
performance, I'll look into that.

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

8 years ago[ClangConfig] Copy ClangConfig.cmake to ${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_D...
Michael Gottesman [Wed, 29 Jun 2016 21:12:38 +0000 (21:12 +0000)]
[ClangConfig] Copy ClangConfig.cmake to ${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR} instead of to ${CLANG_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}.

This is an obvious bug since ClangConfig.cmake looks for ClangTargets.cmake in
${CMAKE_CURRENT_LIST_DIR}. But ClangTargets.cmake is in
${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}, so it will always fail with an
in tree build.

In the case where clang is built out of tree, this is still correct since
CMAKE_BINARY_DIR and CLANG_BINARY_DIR will be the same.

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

8 years agoConvert another case over to RevertingTentativeParsingAction.
Richard Smith [Wed, 29 Jun 2016 21:12:37 +0000 (21:12 +0000)]
Convert another case over to RevertingTentativeParsingAction.

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

8 years agoSwitch to an RAII object to revert tentative parsing automatically.
Richard Smith [Wed, 29 Jun 2016 21:06:51 +0000 (21:06 +0000)]
Switch to an RAII object to revert tentative parsing automatically.

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

8 years ago[ClangConfig] Replace paths with the same value as CLANG_INSTALL_PACKAGE_DIR with...
Michael Gottesman [Wed, 29 Jun 2016 20:22:46 +0000 (20:22 +0000)]
[ClangConfig] Replace paths with the same value as CLANG_INSTALL_PACKAGE_DIR with a deref of the variable.

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

8 years ago[cmake] Move creation of ClangTargets and installation of ClangConfig.cmake from...
Michael Gottesman [Wed, 29 Jun 2016 20:22:44 +0000 (20:22 +0000)]
[cmake] Move creation of ClangTargets and installation of ClangConfig.cmake from ./CMakeLists.txt -> ./cmake/modules/CMakeLists.txt.

This matches LLVM.

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

8 years ago[OpenCL] Allow -cl-std and other standard -cl- options in driver
Yaxun Liu [Wed, 29 Jun 2016 19:39:32 +0000 (19:39 +0000)]
[OpenCL] Allow -cl-std and other standard -cl- options in driver

Allow -cl-std and other standard -cl- options from cc1 to driver.

Added a test for the options moved.

Patch by Aaron En Ye Shi.

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

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

8 years agoAdd CapturedDecl::parameters() ArrayRef accessors following r273647.
Yaron Keren [Wed, 29 Jun 2016 18:55:53 +0000 (18:55 +0000)]
Add CapturedDecl::parameters() ArrayRef accessors following r273647.

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

8 years agoRe-land "[MS] Don't expect vftables to be provided for extern template instantiations"
Reid Kleckner [Wed, 29 Jun 2016 18:29:21 +0000 (18:29 +0000)]
Re-land "[MS] Don't expect vftables to be provided for extern template instantiations"

Reverts r273305 and re-instates r273296.

We needed to fix a bug in Sema::MarkVTableUsed to ensure that operator
delete lookup occurs when the vtable is referenced. We already had a
special case to look up operator delete when dllimport was used, but I
think should really mark virtual destructors referenced any time the
vtable is used.

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

8 years agoAvailabilityAttr: update the document for macosx
Manman Ren [Wed, 29 Jun 2016 15:50:08 +0000 (15:50 +0000)]
AvailabilityAttr: update the document for macosx

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

8 years ago[X86][SSE2] Updated tests to match llvm\test\CodeGen\X86\sse2-intrinsics-fast-isel...
Simon Pilgrim [Wed, 29 Jun 2016 14:04:08 +0000 (14:04 +0000)]
[X86][SSE2] Updated tests to match llvm\test\CodeGen\X86\sse2-intrinsics-fast-isel-x86_64.ll

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

8 years ago[OpenCL] Add attribute 'pure' to read_image built-in functions to enable optimizations.
Alexey Bader [Wed, 29 Jun 2016 12:30:26 +0000 (12:30 +0000)]
[OpenCL] Add attribute 'pure' to read_image built-in functions to enable optimizations.

Reviewers: Anastasia, yaxunl

Subscribers: pekka.jaaskelainen, pxli168, cfe-commits

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

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

8 years ago[OpenCL] Fix typo in as_type test.
Alexey Bader [Wed, 29 Jun 2016 12:25:58 +0000 (12:25 +0000)]
[OpenCL] Fix typo in as_type test.

Reset astype variable in f6 function to avoid matching with wrong value from f5 function.

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

8 years agoUse ArgList::hasFlag to check if -miamcu/-mno-iamcu is passed. NFC.
Andrey Turetskiy [Wed, 29 Jun 2016 10:57:17 +0000 (10:57 +0000)]
Use ArgList::hasFlag to check if -miamcu/-mno-iamcu is passed. NFC.

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

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

8 years ago[Driver][AArch64] Add support for Broadcom Vulcan core.
Pankaj Gode [Wed, 29 Jun 2016 10:00:31 +0000 (10:00 +0000)]
[Driver][AArch64] Add support for Broadcom Vulcan core.

Adding support for new Broadcom Vulcan core (ARMv8.1A).

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

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

8 years ago[AVX512] Zero extend cmp intrinsic return value.
Igor Breger [Wed, 29 Jun 2016 08:14:17 +0000 (08:14 +0000)]
[AVX512]  Zero extend cmp intrinsic return value.

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

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

8 years agoRevert "[Coverage] Adopt llvm::coverage::encodeFilenamesAndRawMappings (NFC)"
Vedant Kumar [Wed, 29 Jun 2016 05:33:09 +0000 (05:33 +0000)]
Revert "[Coverage] Adopt llvm::coverage::encodeFilenamesAndRawMappings (NFC)"

This reverts commit 161ff9db3a3d0d62880d1cb18d58182cd3034912 (r273056).

This is breaking stage2 instrumented builds with "malformed coverage
data" errors.

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

8 years ago[Diag] Add getter shouldAlwaysPrint. NFC
Adam Nemet [Wed, 29 Jun 2016 04:55:31 +0000 (04:55 +0000)]
[Diag] Add getter shouldAlwaysPrint. NFC

For the new hotness attribute, the API will take the pass rather than
the pass name so we can no longer play the trick of AlwaysPrint being a
special pass name. This adds a getter to help the transition.

There is also a corresponding llvm patch.

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

8 years agoMark inheriting constructors as deleted if the corresponding defaulted default
Richard Smith [Wed, 29 Jun 2016 01:10:27 +0000 (01:10 +0000)]
Mark inheriting constructors as deleted if the corresponding defaulted default
constructor would be; this is effectively required by P0136R1. This has the
effect of exposing the validity of the base class initialization steps to
SFINAE checks.

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

8 years agoRevert "[PS4] Tighten up a test (noticed in passing)"
Sean Silva [Wed, 29 Jun 2016 00:29:23 +0000 (00:29 +0000)]
Revert "[PS4] Tighten up a test (noticed in passing)"

This reverts commit r269709.

r262285 changed this deliberately so that the test would not be
sensitive to which binaries are in the same directory as clang.
See the commit message of that commit for more background.

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

8 years agoFunction declarations are, in fact, permitted in the init-statement of a for
Richard Smith [Tue, 28 Jun 2016 23:26:18 +0000 (23:26 +0000)]
Function declarations are, in fact, permitted in the init-statement of a for
loop. Don't confuse Sema by saying they're not.

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

8 years ago[Sema] Disallow ambigious base classes in template argument deduction
Erik Pilkington [Tue, 28 Jun 2016 23:05:09 +0000 (23:05 +0000)]
[Sema] Disallow ambigious base classes in template argument deduction

Fixes PR28195.

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

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

8 years agoObjC Class Property: diagnostics when accessing a class property using instance.
Manman Ren [Tue, 28 Jun 2016 23:01:49 +0000 (23:01 +0000)]
ObjC Class Property: diagnostics when accessing a class property using instance.

When a class property is accessed with an object instance, before this commit,
we try to apply a typo correction of the same property:
property 'c' not found on object of type 'A *'; did you mean 'c'?

With this commit, we correctly emit a diagnostics:
property 'c' is a class property; did you mean to access it with class 'A'?

rdar://26866973

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

8 years agoAvailabilityAttr: we accept "macos" as the platform name.
Manman Ren [Tue, 28 Jun 2016 20:55:30 +0000 (20:55 +0000)]
AvailabilityAttr: we accept "macos" as the platform name.

We continue accepting "macosx" but canonicalize it to "macos", When emitting
diagnostics, we use "macOS" instead of "OS X".

The PlatformName in TargetInfo is changed from "macosx" to "macos" so we can
directly compare the Platform in AvailabilityAttr with the PlatformName
in TargetInfo.

rdar://26795172
rdar://26800775

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

8 years agocxx_status: make c++17 footnote list formatting consistent with other footnote lists.
Richard Smith [Tue, 28 Jun 2016 20:37:43 +0000 (20:37 +0000)]
cxx_status: make c++17 footnote list formatting consistent with other footnote lists.

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

8 years agocxx_status: fix footnote for p0136.
Richard Smith [Tue, 28 Jun 2016 20:37:00 +0000 (20:37 +0000)]
cxx_status: fix footnote for p0136.

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

8 years agoUpdate cxx_dr_status from test/CXX/drs.
Richard Smith [Tue, 28 Jun 2016 20:35:53 +0000 (20:35 +0000)]
Update cxx_dr_status from test/CXX/drs.

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

8 years ago[CMake] Adding USES_TERMINAL to a few additional custom targets
Chris Bieneman [Tue, 28 Jun 2016 20:30:52 +0000 (20:30 +0000)]
[CMake] Adding USES_TERMINAL to a few additional custom targets

These are all long-running commands that should be in the ninja console job pool.

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

8 years agoFix unreasonably-precise CHECK.
Richard Smith [Tue, 28 Jun 2016 19:09:30 +0000 (19:09 +0000)]
Fix unreasonably-precise CHECK.

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

8 years agoP0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:
Richard Smith [Tue, 28 Jun 2016 19:03:57 +0000 (19:03 +0000)]
P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:

Replace inheriting constructors implementation with new approach, voted into
C++ last year as a DR against C++11.

Instead of synthesizing a set of derived class constructors for each inherited
base class constructor, we make the constructors of the base class visible to
constructor lookup in the derived class, using the normal rules for
using-declarations.

For constructors, UsingShadowDecl now has a ConstructorUsingShadowDecl derived
class that tracks the requisite additional information. We create shadow
constructors (not found by name lookup) in the derived class to model the
actual initialization, and have a new expression node,
CXXInheritedCtorInitExpr, to model the initialization of a base class from such
a constructor. (This initialization is special because it performs real perfect
forwarding of arguments.)

In cases where argument forwarding is not possible (for inalloca calls,
variadic calls, and calls with callee parameter cleanup), the shadow inheriting
constructor is not emitted and instead we directly emit the initialization code
into the caller of the inherited constructor.

Note that this new model is not perfectly compatible with the old model in some
corner cases. In particular:
 * if B inherits a private constructor from A, and C uses that constructor to
   construct a B, then we previously required that A befriends B and B
   befriends C, but the new rules require A to befriend C directly, and
 * if a derived class has its own constructors (and so its implicit default
   constructor is suppressed), it may still inherit a default constructor from
   a base class

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

8 years ago[CMake] Connect check-compiler-rt to check-all
Chris Bieneman [Tue, 28 Jun 2016 18:32:22 +0000 (18:32 +0000)]
[CMake] Connect check-compiler-rt to check-all

When using the LLVM_BUILD_EXTERNAL_COMPILER_RT option with
LLVM_ENABLE_TESTS we should also bind check-compiler-rt to check-all so
that the compiler-rt tests run too.

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

8 years agoUpdate the expected masked load/store intrinsics names in tests
Artur Pilipenko [Tue, 28 Jun 2016 18:28:45 +0000 (18:28 +0000)]
Update the expected masked load/store intrinsics names in tests

The mangling of their names was changed in order to support arbitrary addrspace pointers as arguments in rL274043.

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

8 years agoNFC. Test commit, remove a redundant empty line in Tooling.cpp
Artur Pilipenko [Tue, 28 Jun 2016 17:56:29 +0000 (17:56 +0000)]
NFC. Test commit, remove a redundant empty line in Tooling.cpp

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

8 years ago[CMake] Pass LLVM_LIT_ARGS into compiler-rt build.
Chris Bieneman [Tue, 28 Jun 2016 17:00:49 +0000 (17:00 +0000)]
[CMake] Pass LLVM_LIT_ARGS into compiler-rt build.

If top-level lit args are specified, you probably want that in the sub-project too.

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

8 years ago[CMake] [Apple Clang] Enable Compiler-RT tests on stage2 builds
Chris Bieneman [Tue, 28 Jun 2016 16:32:48 +0000 (16:32 +0000)]
[CMake] [Apple Clang] Enable Compiler-RT tests on stage2 builds

We want to be able to run the compiler-rt tests on stage2 build configurations in CI. This should enable that.

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

8 years ago[ASTMatchers] Add isLambda() matcher.
Samuel Benzaquen [Tue, 28 Jun 2016 14:08:56 +0000 (14:08 +0000)]
[ASTMatchers] Add isLambda() matcher.

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

8 years ago[SPARC] Allows inlining of atomics for Sparc32 with appropriate store barrier.
Chris Dewhurst [Tue, 28 Jun 2016 12:55:55 +0000 (12:55 +0000)]
[SPARC] Allows inlining of atomics for Sparc32 with appropriate store barrier.

The final change is required to extend the back-end's AtomicExpandPass that was implemented for Sparc (64 bit) and later extended for Sparc (32 bit).

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

8 years ago[Driver] Add method to redirect output of Compilation.
Nikolay Haustov [Tue, 28 Jun 2016 08:00:42 +0000 (08:00 +0000)]
[Driver] Add method to redirect output of Compilation.

Summary:
Currently output of child process, however in my use case, it
needs to be captured and presented to the user.

Add Redirect method to Compilation and use existing infrastructure
for redirecting output of commands.

Reviewers: tstellarAMD

Subscribers: cfe-commits

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

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

8 years agoRevert r273950, (empty). Please recommit it with readable commit message.
NAKAMURA Takumi [Tue, 28 Jun 2016 06:10:54 +0000 (06:10 +0000)]
Revert r273950, (empty). Please recommit it with readable commit message.

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

8 years ago[clang-cl] Define _MSVC_LANG
David Majnemer [Tue, 28 Jun 2016 03:13:16 +0000 (03:13 +0000)]
[clang-cl] Define _MSVC_LANG

Recently, Microsoft added support for a flag, /std, which controls which
version of the language rules MSVC should use.
MSVC hasn't updated __cplusplus though.
Instead, they added a new macro, _MSVC_LANG, which is defined in a
similar fashion to __cplusplus.  This is used to indicate which mode the
compiler is in.

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

8 years ago[intrin.h] Certain _Interlocked intrinsics return the old value
David Majnemer [Tue, 28 Jun 2016 02:54:43 +0000 (02:54 +0000)]
[intrin.h] Certain _Interlocked intrinsics return the old value

This fixes PR28326.

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

8 years agoAvoid accessing an invalid PresumedLoc.
Jordan Rose [Tue, 28 Jun 2016 01:02:31 +0000 (01:02 +0000)]
Avoid accessing an invalid PresumedLoc.

DiagnosticNoteRenderer asserts trying to emit its "while building
module Foo imported from bar.h:5" note when the presumed location
of the import is invalid. This assertion was added in r267914,
where most uses of 'getFilename' were updated to test 'isValid'
instead. This one must have been missed.

I can't come up with a test because this location is always valid
in C-based code, but external clients that manually import modules
(*cough*Swift*cough*) sometimes provide invalid SourceLocations.

rdar://problem/26099576

http://reviews.llvm.org/D21111

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

8 years agoFrontend: clang-format a statement, NFC
Saleem Abdulrasool [Tue, 28 Jun 2016 00:19:32 +0000 (00:19 +0000)]
Frontend: clang-format a statement, NFC

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

8 years agoAMDGPU: Add builtin to read exec mask
Matt Arsenault [Tue, 28 Jun 2016 00:13:17 +0000 (00:13 +0000)]
AMDGPU: Add builtin to read exec mask

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

8 years agogit-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273950 91177308-0d34-0410...
Chris Dewhurst [Mon, 27 Jun 2016 22:11:12 +0000 (22:11 +0000)]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273950 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAttempting to fix lit test test/Headers/opencl-c-header.cl on cygwin.
Yaxun Liu [Mon, 27 Jun 2016 21:43:00 +0000 (21:43 +0000)]
Attempting to fix lit test test/Headers/opencl-c-header.cl on cygwin.

"chmod u-x *" does not work for lit on cygwin.

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

8 years agoAdd simple, stupid, pattern-based fuzzer / reducer for modules bugs. I've
Richard Smith [Mon, 27 Jun 2016 19:43:46 +0000 (19:43 +0000)]
Add simple, stupid, pattern-based fuzzer / reducer for modules bugs. I've
already used this to find and reduce quite a few bugs, and it works pretty well
if you can find the right patterns.

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

8 years ago[ExprConstant] Fix PR28314 - crash while evluating objectsize.
George Burgess IV [Mon, 27 Jun 2016 19:40:41 +0000 (19:40 +0000)]
[ExprConstant] Fix PR28314 - crash while evluating objectsize.

This fixes a crash in code like:
```
struct A {
  struct B b;
  char c[1];
}

int foo(struct A* a) { return __builtin_object_size(a->c, 0); }
```

We wouldn't check whether the structs we were examining were invalid,
and getting the layout of an invalid struct is (unsurprisingly) A Bad
Thing. With this patch, we'll always return conservatively if we see an
invalid struct, since I'm assuming the presence of an invalid struct
means that our compilation failed (so having a conservative result isn't
such a big deal).

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

8 years ago[OpenMP] Diagnose missing cases of statements between target and teams directives
Kelvin Li [Mon, 27 Jun 2016 19:15:43 +0000 (19:15 +0000)]
[OpenMP] Diagnose missing cases of statements between target and teams directives

Clang fails to diagnose cases such as
#pragma omp target
  while(0) {
    #pragma omp teams
    {}
  }

A patch by David Sheinkman.

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

8 years agoResubmission of http://reviews.llvm.org/D21564 after fixes.
Carlo Bertolli [Mon, 27 Jun 2016 14:55:37 +0000 (14:55 +0000)]
Resubmission of http://reviews.llvm.org/D21564 after fixes.
[OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for'

This patch is an initial implementation for #distribute parallel for.
The main differences that affect other pragmas are:

The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds.
As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value.
As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound.

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

8 years ago[clang-cl] Implement support for /std
David Majnemer [Mon, 27 Jun 2016 02:32:12 +0000 (02:32 +0000)]
[clang-cl] Implement support for /std

/std: supports two arguments, c++14 and c++latest.  Currently, c++latest
maps to c++1z but this might change down the road.

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

8 years ago[X86] add _mm_loadu_si64
Asaf Badouh [Sun, 26 Jun 2016 13:51:54 +0000 (13:51 +0000)]
[X86] add _mm_loadu_si64

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

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

8 years agoFix unused variable warning after r273754.
James Y Knight [Sat, 25 Jun 2016 16:40:53 +0000 (16:40 +0000)]
Fix unused variable warning after r273754.

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

8 years ago[X86] Fix pslldq/psrldq intrinsics to not fail compilation with immediates larger...
Craig Topper [Sat, 25 Jun 2016 07:31:14 +0000 (07:31 +0000)]
[X86] Fix pslldq/psrldq intrinsics to not fail compilation with immediates larger than 16. This was accidentally broken in r272246.

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

8 years agoFix bad test expectation.
Peter Collingbourne [Sat, 25 Jun 2016 00:37:14 +0000 (00:37 +0000)]
Fix bad test expectation.

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

8 years agoCodeGen: Start emitting checked loads when both trapping CFI and -fwhole-program...
Peter Collingbourne [Sat, 25 Jun 2016 00:24:06 +0000 (00:24 +0000)]
CodeGen: Start emitting checked loads when both trapping CFI and -fwhole-program-vtables are enabled.

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

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

8 years agoImplement C++17 P0386R2, inline variables. (The 'inline' specifier gives a
Richard Smith [Sat, 25 Jun 2016 00:15:56 +0000 (00:15 +0000)]
Implement C++17 P0386R2, inline variables. (The 'inline' specifier gives a
variable weak discardable linkage and partially-ordered initialization, and is
implied for constexpr static data members.)

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

8 years agoAdd support for musl-libc on ARM Linux.
Rafael Espindola [Fri, 24 Jun 2016 21:35:06 +0000 (21:35 +0000)]
Add support for musl-libc on ARM Linux.

Patch by Lei Zhang!

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

8 years agoCodeGen: Update Clang to use the new type metadata.
Peter Collingbourne [Fri, 24 Jun 2016 21:21:46 +0000 (21:21 +0000)]
CodeGen: Update Clang to use the new type metadata.

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

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

8 years ago[CMake] Remove CLANG_APPEND_VC_REV option
Chris Bieneman [Fri, 24 Jun 2016 20:21:12 +0000 (20:21 +0000)]
[CMake] Remove CLANG_APPEND_VC_REV option

I added this option in r257827 to try and add compatibility with autoconf. At the time I misunderstood the problem.

Our CMake automatically generates the SVN revision information and generates a build action to update it so builds don't need to be re-configured on SCM update (which is a better solution than we had in autoconf).

The problem I was actually seeing was isolated cases where SVN revision information isn't available because the repository structures have been removed. This happens in some automated testing systems.

This patch allows SVN_REVISION to be overridden if the build configuration could not find the SCM repository structures, and removes the code from my original patch because it is unnecessary.

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

8 years agoRevert r273705
Carlo Bertolli [Fri, 24 Jun 2016 19:20:02 +0000 (19:20 +0000)]
Revert r273705

 [OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for'

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

8 years ago[OpenMP] Initial implementation of parse and sema for composite pragma 'distribute...
Carlo Bertolli [Fri, 24 Jun 2016 18:53:35 +0000 (18:53 +0000)]
[OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for'

http://reviews.llvm.org/D21564

This patch is an initial implementation for #distribute parallel for.
The main differences that affect other pragmas are:

The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds.
As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value.
As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound.

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

8 years agoclang-format: [JS] Fix build breakage.
Martin Probst [Fri, 24 Jun 2016 17:45:13 +0000 (17:45 +0000)]
clang-format: [JS] Fix build breakage.

Checking Line.MustBeDeclaration does actually break the field and param initializer use case.

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

8 years agoDeadStoresChecker: Don't warn about dead stores into volatile variables
Stephan Bergmann [Fri, 24 Jun 2016 16:26:43 +0000 (16:26 +0000)]
DeadStoresChecker: Don't warn about dead stores into volatile variables

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