]> granicus.if.org Git - clang/log
clang
8 years agoCodeGen: support blocks on COFF targets in DLLs
Saleem Abdulrasool [Sat, 28 May 2016 19:41:35 +0000 (19:41 +0000)]
CodeGen: support blocks on COFF targets in DLLs

This extends the blocks support to support blocks with a dynamically linked
blocks runtime.  The previous code generation would work only for static builds
of the blocks runtime.  Mark the block "isa" pointers and functions as dllimport
if no explicit declaration marked with __declspec(dllexport) is found.  This
additional check allows for the use of the functionality in the runtime library
if desired.

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

8 years ago[OpenCL] Add the default header file opencl-c.h for OpenCL C language
Yaxun Liu [Sat, 28 May 2016 19:09:01 +0000 (19:09 +0000)]
[OpenCL] Add the default header file opencl-c.h for OpenCL C language

OpenCL has large number of "builtin" functions ("builtin" in the sense of OpenCL spec) which are defined in header files. To compile OpenCL kernels using these builtin functions, a header file is needed.

This header file is based on the Khronos implementation (https://github.com/KhronosGroup/SPIR/blob/spirv-1.0/lib/Headers/opencl.h) with heavy refactoring.

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

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

8 years ago[AVX512] Add masked v16i32 and v8i64 unaligned store tests.
Craig Topper [Sat, 28 May 2016 18:59:06 +0000 (18:59 +0000)]
[AVX512] Add masked v16i32 and v8i64 unaligned store tests.

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

8 years ago[driver][mips] Fix local variable naming. NFC
Simon Atanasyan [Sat, 28 May 2016 09:44:15 +0000 (09:44 +0000)]
[driver][mips] Fix local variable naming. NFC

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

8 years ago[driver][mips] Revert support for CodeSourcery MIPS toolchain
Simon Atanasyan [Sat, 28 May 2016 09:44:04 +0000 (09:44 +0000)]
[driver][mips] Revert support for CodeSourcery MIPS toolchain

This is revert of r270366. The support for CS toolchain were dropped too early.

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

8 years ago[X86][SSE] Replace VPMOVSX and (V)PMOVZX integer extension intrinsics with generic...
Simon Pilgrim [Sat, 28 May 2016 08:12:45 +0000 (08:12 +0000)]
[X86][SSE] Replace VPMOVSX and (V)PMOVZX integer extension intrinsics with generic IR (clang)

The VPMOVSX and (V)PMOVZX sign/zero extension intrinsics can be safely represented as generic __builtin_convertvector calls instead of x86 intrinsics.

This patch removes the clang builtins and their use in the sse2/avx headers - a companion patch will remove/auto-upgrade the llvm intrinsics.

Note: We already did this for SSE41 PMOVSX sometime ago.

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

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

8 years agoAMDGPU: Add fract builtin
Matt Arsenault [Sat, 28 May 2016 00:43:27 +0000 (00:43 +0000)]
AMDGPU: Add fract builtin

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

8 years agoClean up: remove trailing spaces in x86 intrinsic headers.
Ekaterina Romanova [Sat, 28 May 2016 00:18:59 +0000 (00:18 +0000)]
Clean up: remove trailing spaces in x86 intrinsic headers.

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

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

8 years agodocs: Clarify that LTO visibility is based on source-level symbol visibility.
Peter Collingbourne [Fri, 27 May 2016 22:31:30 +0000 (22:31 +0000)]
docs: Clarify that LTO visibility is based on source-level symbol visibility.

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

8 years ago[Driver] Fix driver support for color diagnostics
Bruno Cardoso Lopes [Fri, 27 May 2016 20:43:00 +0000 (20:43 +0000)]
[Driver] Fix driver support for color diagnostics

Diagnostics that happen during driver time do not have color output support
unless -fcolor-diagonostic is explicitly passed into the driver.  This is not a
problem for cc1 since dianostic arguments are properly handled and color is
enabled by default if the terminal supports it.

Make the driver behave like CC1. There are tests that already check for these
flags, but for the color itself there's no sensible way to test it.

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

rdar://problem/26290980

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

8 years ago[Headers] Remove redundant typedef. NFC.
Ahmed Bougacha [Fri, 27 May 2016 17:57:23 +0000 (17:57 +0000)]
[Headers] Remove redundant typedef. NFC.

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

8 years agoAdd instcombine pass if sampleprofile pass is enabled.
Dehao Chen [Fri, 27 May 2016 16:14:35 +0000 (16:14 +0000)]
Add instcombine pass if sampleprofile pass is enabled.

Summary: Sample profile pass need to have instcombine pass. A related change is http://reviews.llvm.org/D17742. But we should not explicitly add dependency between to non-analysis passes. So we add the dependency here.

Reviewers: davidxl, dnovillo

Subscribers: llvm-commits

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

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

8 years ago[msan] add a sentence about inline assembly
Kostya Serebryany [Fri, 27 May 2016 15:49:32 +0000 (15:49 +0000)]
[msan] add a sentence about inline assembly

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

8 years ago[OpenMP] Fix SEMA bug in the capture of global variables in template functions.
Samuel Antao [Fri, 27 May 2016 15:21:27 +0000 (15:21 +0000)]
[OpenMP] Fix SEMA bug in the capture of global variables in template functions.

Summary:
Target regions require globals to be captured. This patch fixes a bug exposed when that happens in a template function.

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

Subscribers: guansong, ABataev, cfe-commits, caomhin, fraggamuffin

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

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

8 years ago[mips] Compact branch policy setting.
Simon Dardis [Fri, 27 May 2016 15:13:31 +0000 (15:13 +0000)]
[mips] Compact branch policy setting.

This patch adds the commandline option -mcompact-branches={never,optimal,always),
which controls how LLVM generates compact branches for MIPSR6 targets. By default,
the compact branch policy is 'optimal' where LLVM will generate the most
appropriate branch for any situation. The 'never' and 'always' policy will disable
or always generate compact branches wherever possible respectfully.

Reviewers: dsanders, vkalintiris, atanasyan

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

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

8 years ago[mips] Kill 'support' for untested EABI.
Daniel Sanders [Fri, 27 May 2016 14:30:23 +0000 (14:30 +0000)]
[mips] Kill 'support' for untested EABI.

Summary:
There are no llvm backend tests* for EABI and no EABI buildbots. There were only
three clang tests, all of which checked that -mabi=eabi was passed to the
assembler.

*There is a single backend test that specifies EABI but it actually tests MIPS16.

Reviewers: atanasyan

Subscribers: emaste, sdardis, atanasyan, cfe-commits

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

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

8 years agoApply clang-tidy's misc-move-constructor-init throughout Clang.
Benjamin Kramer [Fri, 27 May 2016 14:27:13 +0000 (14:27 +0000)]
Apply clang-tidy's misc-move-constructor-init throughout Clang.

No functionality change intended, maybe a tiny performance improvement.

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

8 years agoTurn copies into references as suggested by clang-tidy's performance-unnecessary...
Benjamin Kramer [Fri, 27 May 2016 13:36:58 +0000 (13:36 +0000)]
Turn copies into references as suggested by clang-tidy's performance-unnecessary-copy-initialization.

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

8 years ago[Frontend] StringRefize and fix bad indentation.
Benjamin Kramer [Fri, 27 May 2016 12:52:19 +0000 (12:52 +0000)]
[Frontend] StringRefize and fix bad indentation.

NFC intended.

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

8 years agoUpdate for following LLVM commit.
George Rimar [Fri, 27 May 2016 12:15:25 +0000 (12:15 +0000)]
Update for following LLVM commit.

It will be:
Recommit 270977 - [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections.

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

8 years ago[mips] Fold MipsTargetInfoBase subclasses into MipsTargetInfoBase and rename to MipsT...
Daniel Sanders [Fri, 27 May 2016 11:51:02 +0000 (11:51 +0000)]
[mips] Fold MipsTargetInfoBase subclasses into MipsTargetInfoBase and rename to MipsTargetInfo. NFC

Summary:
This unifies mips/mipsel and mips64/mips64el into a single class so that we can
later support O32 on mips64/mips64el and N32/N64 on mips/mipsel (when an
appropriate CPU selected).

Reviewers: atanasyan

Subscribers: atanasyan, jfb, cfe-commits, dschuff

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

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

8 years agoConvert assert to static_assert. NFC.
Benjamin Kramer [Fri, 27 May 2016 11:48:53 +0000 (11:48 +0000)]
Convert assert to static_assert. NFC.

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

8 years agoclang-format: Allow splitting the line after /**/-comments.
Daniel Jasper [Fri, 27 May 2016 08:59:34 +0000 (08:59 +0000)]
clang-format: Allow splitting the line after /**/-comments.

While it might change the meaning of the comment in rare circumstances,
it is better than violating the column limit.

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

8 years ago[MSVC2015] Fix mangling for static variables initialization guards
Dmitry Polukhin [Fri, 27 May 2016 08:52:34 +0000 (08:52 +0000)]
[MSVC2015] Fix mangling for static variables initialization guards

It seems that suffix '@4HA' was omitted for unknown reason. It is
non-cont non-volatile 'int' type of normal variable TSS.

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

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

8 years ago[clang-format] moved unit tests related to replacements cleaner from FormatTest.cpp...
Eric Liu [Fri, 27 May 2016 08:20:02 +0000 (08:20 +0000)]
[clang-format] moved unit tests related to replacements cleaner from FormatTest.cpp to CleanUpTest.cpp.

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

8 years ago[AVX512][Builtin] Fix palignr intrinsic for avx512vlbw. The immediate should not...
Craig Topper [Fri, 27 May 2016 06:59:39 +0000 (06:59 +0000)]
[AVX512][Builtin] Fix palignr intrinsic for avx512vlbw. The immediate should not be multiplied by 8.

The 512-bit version was fixed recently but this was missed.

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

8 years ago[OPENMP] Fixed processing of '-fopenmp-version=' option and test.
Alexey Bataev [Fri, 27 May 2016 04:13:39 +0000 (04:13 +0000)]
[OPENMP] Fixed processing of '-fopenmp-version=' option and test.

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

8 years ago[CodeGen] Don't crash when sizeof(long) != 4 for some intrins
David Majnemer [Fri, 27 May 2016 02:06:19 +0000 (02:06 +0000)]
[CodeGen] Don't crash when sizeof(long) != 4 for some intrins

_InterlockedIncrement and _InterlockedDecrement have 'long' in their
prototypes.  We assumed 'long' was the same size as an i32 which is
incorrect for other targets.

This fixes PR27892.

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

8 years ago[Intrin.h] Sort the __read[fg]s intrinsics
David Majnemer [Fri, 27 May 2016 02:06:14 +0000 (02:06 +0000)]
[Intrin.h] Sort the __read[fg]s intrinsics

No functional change is intended.

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

8 years agoOpenMPClause.h: Fix r270882. [-Wdocumentation]
NAKAMURA Takumi [Fri, 27 May 2016 00:15:11 +0000 (00:15 +0000)]
OpenMPClause.h: Fix r270882. [-Wdocumentation]

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

8 years agoProduce better pretty stack traces from crashes in template instantiation: add
Richard Smith [Thu, 26 May 2016 20:23:13 +0000 (20:23 +0000)]
Produce better pretty stack traces from crashes in template instantiation: add
pretty stack trace entries for all cases where we instantiate the definition of
something, and include the fully-qualified name with template arguments in the
name of the instantiated entity.

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

8 years agoRe-commit r270748 "clang-cl: Treat dllimport explicit template instantiation definiti...
Hans Wennborg [Thu, 26 May 2016 19:42:56 +0000 (19:42 +0000)]
Re-commit r270748 "clang-cl: Treat dllimport explicit template instantiation definitions as declarations (PR27810, PR27811)"

Also make explicit instantiation decls not apply to nested classes when
targeting MSVC. That dll attributes are not inherited by inner classes
might be the explanation for MSVC's behaviour here.

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

8 years ago[AMDGPU] Remove individual debugger options + update features
Konstantin Zhuravlyov [Thu, 26 May 2016 19:36:39 +0000 (19:36 +0000)]
[AMDGPU] Remove individual debugger options + update features

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

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

8 years ago[OpenMP] Codegen for target update directive.
Samuel Antao [Thu, 26 May 2016 18:30:22 +0000 (18:30 +0000)]
[OpenMP] Codegen for target update directive.

Summary: This patch implements the code generation for the `target update` directive. The implemntation relies on the logic already in place for target data standalone directives, i.e. target enter/exit data.

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

Subscribers: caomhin, cfe-commits

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

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

8 years ago[OpenMP] Parsing and sema support for the from clause
Samuel Antao [Thu, 26 May 2016 17:49:04 +0000 (17:49 +0000)]
[OpenMP] Parsing and sema support for the from clause

Summary:
The patch contains the parsing and sema support for the `from` clause.

Patch based on the original post by Kelvin Li.

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

Subscribers: caomhin, cfe-commits

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

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

8 years ago[OpenMP] Parsing and sema support for the to clause
Samuel Antao [Thu, 26 May 2016 17:39:58 +0000 (17:39 +0000)]
[OpenMP] Parsing and sema support for the to clause

Summary:
The patch contains the parsing and sema support for the `to` clause.

Patch based on the original post by Kelvin Li.

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

Subscribers: caomhin, cfe-commits

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

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

8 years ago[OpenMP] Parsing and sema support for target update directive
Samuel Antao [Thu, 26 May 2016 17:30:50 +0000 (17:30 +0000)]
[OpenMP] Parsing and sema support for target update directive

Summary:
This patch is to add parsing and sema support for `target update` directive. Support for the `to` and `from` clauses will be added by a different patch.  This patch also adds support for other clauses that are already implemented upstream and apply to `target update`, e.g. `device` and `if`.

This patch is based on the original post by Kelvin Li.

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

Subscribers: caomhin, cfe-commits

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

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

8 years ago[OpenMP] Add support for the 'private pointer' flag to signal variables captured...
Samuel Antao [Thu, 26 May 2016 16:53:38 +0000 (16:53 +0000)]
[OpenMP] Add support for the 'private pointer' flag to signal variables captured in target regions and used in first-private clauses.

Summary: If a variable is implicitly mapped (doesn't show in a map clause), the runtime library has to be informed if the corresponding capture shows up in first-private clause, so that the storage previously allocated in the device is used. This patch adds the support for that.

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

Subscribers: caomhin, cfe-commits

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

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

8 years ago[OpenMP] Adjust map type bits according to latest spec and use zero size array sectio...
Samuel Antao [Thu, 26 May 2016 16:48:10 +0000 (16:48 +0000)]
[OpenMP] Adjust map type bits according to latest spec and use zero size array sections for pointers.

Summary: This patch changes the bits used to specify the map types according to the latest version of the libomptarget document and add the support for zero size array section when pointers are being implicitly mapped. This completes the missing new 4.5 map semantics.

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

Subscribers: caomhin, cfe-commits

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

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

8 years agoAdding missing _mm512_castsi512_si256 intrinsic.
Michael Zuckerman [Thu, 26 May 2016 14:32:11 +0000 (14:32 +0000)]
Adding missing _mm512_castsi512_si256 intrinsic.

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

8 years ago[Analyzer] Correct stack address escape diagnostic
Sean Eveson [Thu, 26 May 2016 14:02:17 +0000 (14:02 +0000)]
[Analyzer] Correct stack address escape diagnostic

Summary:
Leaking a stack address via a static variable refers to it in the diagnostic as a 'global'. This patch corrects the diagnostic for static variables.

Patch by Phil Camp, SN Systems

Reviewers: dcoughlin, zaks.anna

Subscribers: xazax.hun, cfe-commits

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

Patch by Phil Camp

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

8 years agoFix crash while parsing variable template with variadic template arguments
Olivier Goffart [Thu, 26 May 2016 12:55:34 +0000 (12:55 +0000)]
Fix crash while parsing variable template with variadic template arguments

It is only a crash if the compiler optimize for this!=nullptr because
LocalInstantiationScope::getPartiallySubstitutedPack checks if 'this' is null
(This is crashing when clang is compiled with GCC6)

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

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

8 years ago[driver][mips] Specify stdlib used in the tests explicitly
Simon Atanasyan [Thu, 26 May 2016 11:32:19 +0000 (11:32 +0000)]
[driver][mips] Specify stdlib used in the tests explicitly

That allows to pass the tests even if default stdlib is not libstdc++.

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

8 years ago[OPENMP] Add option '-fopenmp-version=[31|40|45]' allowing choosing
Alexey Bataev [Thu, 26 May 2016 11:10:11 +0000 (11:10 +0000)]
[OPENMP] Add option '-fopenmp-version=[31|40|45]' allowing choosing
OpenMP version.

If '-fopenmp' option is provided '-fopenmp-version=' allows to control,
which version of OpenMP must be supported. Currently it affects only the
value of _OPENMP define.

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

8 years ago[X86][F16C] Improved f16c intrinsics checks
Simon Pilgrim [Thu, 26 May 2016 10:20:25 +0000 (10:20 +0000)]
[X86][F16C] Improved f16c intrinsics checks

Added checks for upper elements being zero'd in scalar conversions

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

8 years ago[MSVC] Support for __unaligned qualifier in functions
Andrey Bokhanko [Thu, 26 May 2016 10:06:01 +0000 (10:06 +0000)]
[MSVC] Support for __unaligned qualifier in functions

This implements support for MS-specific __unaligned qualifier in functions and
makes the following test case both compile and mangle correctly:

struct S {
    void f() __unaligned;
};
void S::f() __unaligned {
}

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

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

8 years ago[X86][AVX2] Improved checks for float/double mask generation for non-masked gathers
Simon Pilgrim [Thu, 26 May 2016 09:56:50 +0000 (09:56 +0000)]
[X86][AVX2] Improved checks for float/double mask generation for non-masked gathers

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

8 years agoFix instrinsics names:
Michael Zuckerman [Thu, 26 May 2016 08:10:12 +0000 (08:10 +0000)]
Fix instrinsics names:
_mm128_cmp_ps_mask-->_mm_cmp_ps_mask
_mm128_mask_cmp_ps_mask-->_mm_mask_cmp_ps_mask
_mm128_cmp_pd_mask-->_mm_cmp_pd_mask
_mm128_mask_cmp_pd_mask-->_mm_mask_cmp_pd_mask

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

8 years ago[Clang][AVX512][BUILTIN] Adding intrinsics for set1
Michael Zuckerman [Thu, 26 May 2016 06:54:52 +0000 (06:54 +0000)]
[Clang][AVX512][BUILTIN] Adding intrinsics for set1

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

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

8 years ago[OPENMP] Set '_OPENMP' macro to '201511' value to reflect support for
Alexey Bataev [Thu, 26 May 2016 04:56:05 +0000 (04:56 +0000)]
[OPENMP] Set '_OPENMP' macro to '201511' value to reflect support for
OpenMP 4.5.

According to OpenMP 4.5 the _OPENMP macro name is defined to have the decimal value yyyymm where yyyy and mm are the year and month designations of the version of the OpenMP API that the implementation supports. Clang supports OpenMP 4.5 so updated value of _OPENMP macro to 201511.

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

8 years agoDon't feed standard error to FileCheck.
Akira Hatanaka [Thu, 26 May 2016 02:32:10 +0000 (02:32 +0000)]
Don't feed standard error to FileCheck.

This is an attempt to fix the buildbot that started failing after
r270808.

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/13141

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

8 years ago[ObjC] Remove _Atomic from return type and parameter type of
Akira Hatanaka [Thu, 26 May 2016 00:37:30 +0000 (00:37 +0000)]
[ObjC] Remove _Atomic from return type and parameter type of
objective-c properties.

This fixes an assert in CodeGen that fires when the getter and setter
functions for an objective-c property of type _Atomic(_Bool) are
synthesized.

rdar://problem/26322972

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

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

8 years ago[Sema] Use the failure bits introduced by r270781.
George Burgess IV [Wed, 25 May 2016 22:38:36 +0000 (22:38 +0000)]
[Sema] Use the failure bits introduced by r270781.

r270781 introduced the ability to track whether or not we might have
had unmodeled side-effects during constant expression evaluation. This
patch makes the constexpr evaluator use that tracking.

Reviewed as a part of D18540.

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

8 years ago[Sema] Note when we encounter a problem in ExprConstant.
George Burgess IV [Wed, 25 May 2016 22:31:54 +0000 (22:31 +0000)]
[Sema] Note when we encounter a problem in ExprConstant.

Currently, the constexpr evaluator is very conservative about unmodeled
side-effects when we're evaluating an expression in a mode that allows
such side-effects.

This patch makes us note when we might have actually encountered an
unmodeled side-effect, which allows us to be more accurate when we know
an unmodeled side-effect couldn't have occurred.

This patch has been split into two commits; this one primarily
introduces the bits necessary to track whether we might have potentially
hit such a side-effect. The one that actually does the tracking (which
boils down to more or less a rename of keepEvaluatingAfterFailure to
noteFailure) is coming soon.

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

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

8 years ago[CGDebugInfo] Modify the preferred expression location for member calls.
Hal Finkel [Wed, 25 May 2016 22:08:27 +0000 (22:08 +0000)]
[CGDebugInfo] Modify the preferred expression location for member calls.

If the callee has a valid location (not all do), then use that. Otherwise, fall
back to the starting location. This makes sure that the debug info for calls
points to the call (not the start of the expression providing the object on
which the member function is being called).

For example, given this:

  f->foo()->bar();

we don't want both calls to point to the 'f', but rather to the 'foo()' and
the 'bar()'.

Fixes PR27567.

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

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

8 years agoFix rejects-valid on constexpr function that accesses a not-yet-defined 'extern
Richard Smith [Wed, 25 May 2016 22:06:25 +0000 (22:06 +0000)]
Fix rejects-valid on constexpr function that accesses a not-yet-defined 'extern
const' variable. That variable might be defined as 'constexpr', so we cannot
prove that a use of it could never be a constant expression.

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

8 years agoAdd a loop's debug location to its llvm.loop metadata
Hal Finkel [Wed, 25 May 2016 21:53:24 +0000 (21:53 +0000)]
Add a loop's debug location to its llvm.loop metadata

Getting accurate locations for loops is important, because those locations are
used by the frontend to generate optimization remarks. Currently, optimization
remarks for loops often appear on the wrong line, often the first line of the
loop body instead of the loop itself. This is confusing because that line might
itself be another loop, or might be somewhere else completely if the body was
an inlined function call. This happens because of the way we find the loop's
starting location. First, we look for a preheader, and if we find one, and its
terminator has a debug location, then we use that. Otherwise, we look for a
location on an instruction in the loop header.

The fallback heuristic is not bad, but will almost always find the beginning of
the body, and not the loop statement itself. The preheader location search
often fails because there's often not a preheader, and even when there is a
preheader, depending on how it was formed, it sometimes carries the location of
some preceeding code.

I don't see any good theoretical way to fix this problem. On the other hand,
this seems like a straightforward solution: Put the debug location in the
loop's llvm.loop metadata. When emitting debug information, this commit causes
us to add the debug location as an operand to each loop's llvm.loop metadata.
Thus, we now generate this metadata for all loops (not just loops with
optimization hints) when we're otherwise generating debug information.

The remark test case changes depend on the companion LLVM commit r270771.

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

8 years agoRevert r270748 "clang-cl: Treat dllimport explicit template instantiation definitions...
Hans Wennborg [Wed, 25 May 2016 20:49:14 +0000 (20:49 +0000)]
Revert r270748 "clang-cl: Treat dllimport explicit template instantiation definitions as declarations (PR27810, PR27811)"

It seems to have broken the sanitizer-windows bot.
Reverting while investigating.

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

8 years agoclang-cl: Treat dllimport explicit template instantiation definitions as declarations...
Hans Wennborg [Wed, 25 May 2016 20:16:43 +0000 (20:16 +0000)]
clang-cl: Treat dllimport explicit template instantiation definitions as declarations (PR27810, PR27811)

This matches what MSVC does, and should make compiles faster by avoiding to
unnecessarily emit a lot of code.

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

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

8 years agoUse new triple API to check comdat /NFC
Xinliang David Li [Wed, 25 May 2016 17:25:57 +0000 (17:25 +0000)]
Use new triple API to check comdat /NFC

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

8 years ago[X86][AVX2] Full set of AVX2 intrinsics tests
Simon Pilgrim [Wed, 25 May 2016 15:10:49 +0000 (15:10 +0000)]
[X86][AVX2] Full set of AVX2 intrinsics tests

llvm/test/CodeGen/X86/avx2-intrinsics-fast-isel.ll will be synced to this

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

8 years ago[Clang][AVX512][Builtin] Fix palignr intrinsics header
Michael Zuckerman [Wed, 25 May 2016 15:05:03 +0000 (15:05 +0000)]
[Clang][AVX512][Builtin] Fix palignr intrinsics header

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

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

8 years ago[AVX512] Don't rely on value names. They're different in release builds.
Benjamin Kramer [Wed, 25 May 2016 14:30:01 +0000 (14:30 +0000)]
[AVX512] Don't rely on value names. They're different in release builds.

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

8 years agoFix mangled name of method with ns_consumed parameters.
Nico Weber [Wed, 25 May 2016 14:15:08 +0000 (14:15 +0000)]
Fix mangled name of method with ns_consumed parameters.

When a function/method use a parameter with "ns_consumed" attribute,
ensure that the mangled name is the same whether -fobjc-arc is used
or not.

Since "ns_consumed" attribute is generally used to inform ARC that
a function/method does sink the reference, it mean it is usually
implemented in a compilation unit compiled without -fobjc-arc but
used form a compilation unit compiled with it.

Originally found while trying to use "ns_consumed" attribute in an
Objective-C++ file in Chromium (http://crbug.com/599980) where it
caused a linker error.

Regression introduced by revision 262278 (previously the attribute
was incorrectly not part of the mangled name).

Patch from Sylvain Defresne <sdefresne@chromium.org>!
http://reviews.llvm.org/D20113

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

8 years ago[Clang][AVX512][BUILTIN] Add missing intrinsics for cast
Michael Zuckerman [Wed, 25 May 2016 14:04:21 +0000 (14:04 +0000)]
[Clang][AVX512][BUILTIN] Add missing intrinsics for cast

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

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

8 years agoFix build problem in MSVC
Alexey Bataev [Wed, 25 May 2016 12:51:24 +0000 (12:51 +0000)]
Fix build problem in MSVC

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

8 years agoRevert "[AArch64] Using new TargetParser in Clang"
Renato Golin [Wed, 25 May 2016 12:36:31 +0000 (12:36 +0000)]
Revert "[AArch64] Using new TargetParser in Clang"

This reverts commit r270688 and r270689. The issue is not a random order, but a
different order for some targets and others (prob. Linux vs Darwin). Reverting until
we have a better fix.

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

8 years ago[OPENMP 4.5] Codegen for dacross loop synchronization constructs.
Alexey Bataev [Wed, 25 May 2016 12:36:08 +0000 (12:36 +0000)]
[OPENMP 4.5] Codegen for dacross loop synchronization constructs.

OpenMP 4.5 adds support for doacross loop synchronization. Patch
implements codegen for this construct.

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

8 years ago[AArch64] Try to fix test from r270688 with unordered output
Renato Golin [Wed, 25 May 2016 12:16:28 +0000 (12:16 +0000)]
[AArch64] Try to fix test from r270688 with unordered output

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

8 years ago[AArch64] Using new TargetParser in Clang
Renato Golin [Wed, 25 May 2016 12:02:58 +0000 (12:02 +0000)]
[AArch64] Using new TargetParser in Clang

Using AArch64TargetParser in clang to avoid repetitive string parsing.

Use TargetParser to do ARCH/CPU/ArchExt parsing instead of local implementation.

Patch by Jojo Ma.

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

8 years ago[ms][dll] #26935 Defining a dllimport function should cause it to be exported
Denis Zobnin [Wed, 25 May 2016 11:32:42 +0000 (11:32 +0000)]
[ms][dll] #26935 Defining a dllimport function should cause it to be exported

If we have some function with dllimport attribute and then we have the function
definition in the same module but without dllimport attribute we should add
dllexport attribute to this function definition.
The same should be done for variables.

Example:
struct __declspec(dllimport) C3 {
  ~C3();
};
C3::~C3() {;} // we should export this definition.

Patch by Andrew V. Tischenko

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

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

8 years ago[X86][SSE] Updated _mm_store_ps1 test to match _mm_store1_ps
Simon Pilgrim [Wed, 25 May 2016 09:20:08 +0000 (09:20 +0000)]
[X86][SSE] Updated _mm_store_ps1 test to match _mm_store1_ps

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

8 years agoRename a variable to avoid shadowing function parameter. NFC.
Bob Wilson [Wed, 25 May 2016 05:42:00 +0000 (05:42 +0000)]
Rename a variable to avoid shadowing function parameter. NFC.

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

8 years agoarc-repeated-use-of-weak should not warn about IBOutlet properties
Bob Wilson [Wed, 25 May 2016 05:41:57 +0000 (05:41 +0000)]
arc-repeated-use-of-weak should not warn about IBOutlet properties

Revision r211132 was supposed to disable -Warc-repeated-use-of-weak for
Objective-C properties marked with the IBOutlet attribute. Those properties
are supposed to be weak but they are only accessed from the main thread
so there is no risk of asynchronous updates setting them to nil. That
combination makes -Warc-repeated-use-of-weak very noisy. The previous
change only handled one kind of access to weak IBOutlet properties.
Instead of trying to add checks for all the different kinds of property
accesses, this patch removes the previous special case check and adds a
check at the point where the diagnostic is reported. rdar://21366461

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

8 years ago[X86] Update test cases to make sure storeu builtins use the storeu instrinsics....
Craig Topper [Wed, 25 May 2016 05:26:23 +0000 (05:26 +0000)]
[X86] Update test cases to make sure storeu builtins use the storeu instrinsics. We were previously matching on other stores in the IR from this being an -O0 test.

We should probably look into making the storeu builtins just emit a normal store with an alignment of 1.

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

8 years agoclang-cl: Fix unused argument warning when combining /O2 and /Ob2
Hans Wennborg [Wed, 25 May 2016 00:43:45 +0000 (00:43 +0000)]
clang-cl: Fix unused argument warning when combining /O2 and /Ob2

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

8 years ago[esan|wset] Add working set tool driver flags
Derek Bruening [Wed, 25 May 2016 00:41:24 +0000 (00:41 +0000)]
[esan|wset] Add working set tool driver flags

Summary:
Adds a new -fsanitize=efficiency-working-set flag to enable esan's working
set tool.  Adds appropriate tests for the new flag.

Reviewers: aizatsky

Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits

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

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

8 years agodocs: Document how safestack handles setjmp and exceptions.
Peter Collingbourne [Tue, 24 May 2016 23:38:02 +0000 (23:38 +0000)]
docs: Document how safestack handles setjmp and exceptions.

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

8 years agoRename test/CodeGen/inline-optim.cc to .c and provide a triple
Hans Wennborg [Tue, 24 May 2016 23:37:56 +0000 (23:37 +0000)]
Rename test/CodeGen/inline-optim.cc to .c and provide a triple

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

8 years agoMake the altivec intrinsics that require immediate constant propagation
Eric Christopher [Tue, 24 May 2016 22:25:06 +0000 (22:25 +0000)]
Make the altivec intrinsics that require immediate constant propagation
macros rather than functions.

Unfortunately couldn't come up with a simple testcase that didn't need
code generation to verify what was going on.

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

8 years ago[ms] Allow more unqualified lookup of types in dependent base classes
Reid Kleckner [Tue, 24 May 2016 21:23:54 +0000 (21:23 +0000)]
[ms] Allow more unqualified lookup of types in dependent base classes

Summary:
In dependent contexts where we know a type name is required, such as a
new expression, we can recover by forming a DependentNameType.

This generalizes our existing compatibility hack for default arguments
for template type parameters.

Works towards parsing atlctrlw.h, which is PR26748.

Reviewers: avt77, rsmith

Subscribers: cfe-commits

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

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

8 years agoclang-cl: Bake /Ob0 and /Ob2 into the general /O option handling
Hans Wennborg [Tue, 24 May 2016 21:23:29 +0000 (21:23 +0000)]
clang-cl: Bake /Ob0 and /Ob2 into the general /O option handling

This is a follow-up to r270609, wherein I forgot that /O options can
be combined, and e.g. /Odb2 is a valid combination.

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

8 years ago[Driver] Add support for -finline-functions and /Ob2 flags
Hans Wennborg [Tue, 24 May 2016 20:40:51 +0000 (20:40 +0000)]
[Driver] Add support for -finline-functions and /Ob2 flags

-finline-functions and /Ob2 are currently ignored by Clang. The only way to
enable inlining is to use the global O flags, which also enable other options,
or to emit LLVM bitcode using Clang, then running opt by hand with the inline
pass.

This patch allows to simply use the -finline-functions flag (same as GCC) or
/Ob2 in clang-cl mode to enable inlining without other optimizations.

This is the first patch of a serie to improve support for the /Ob flags.

Patch by Rudy Pons <rudy.pons@ilod.org>!

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

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

8 years ago[RecordLayout] Use an ASTVector instead of using a separate pointer and counter
David Majnemer [Tue, 24 May 2016 18:10:50 +0000 (18:10 +0000)]
[RecordLayout] Use an ASTVector instead of using a separate pointer and counter

No functional change is intended.

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

8 years agoRevert "[Lex] Support more type-traits in __has_feature"
David Majnemer [Tue, 24 May 2016 17:21:42 +0000 (17:21 +0000)]
Revert "[Lex] Support more type-traits in __has_feature"

This reverts commit r270580.  Using __has_feature to test for
type-traits is deprecated.

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

8 years ago[Lex] Support more type-traits in __has_feature
David Majnemer [Tue, 24 May 2016 16:53:13 +0000 (16:53 +0000)]
[Lex] Support more type-traits in __has_feature

It looks like we forgot to update the __has_feature support when we
added some of the type traits.

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

8 years ago[MS Volatile] Don't make volatile loads/stores to underaligned objects atomic
David Majnemer [Tue, 24 May 2016 16:09:25 +0000 (16:09 +0000)]
[MS Volatile] Don't make volatile loads/stores to underaligned objects atomic

Underaligned atomic LValues require libcalls which MSVC doesn't have.
MSVC doesn't seem to consider such operations as requiring a barrier
anyway.

This fixes PR27843.

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

8 years ago[modules] Ask the canonical decl whether the constructor was defaulted.
Vassil Vassilev [Tue, 24 May 2016 12:10:36 +0000 (12:10 +0000)]
[modules] Ask the canonical decl whether the constructor was defaulted.

In case of template instantiations query the template instantiation pattern,
which had actually '=default'.

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

Patch reviewed by Richard Smith.

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

8 years ago[Sparc] Add software float option -msoft-float
Jacob Baungard Hansen [Tue, 24 May 2016 08:30:08 +0000 (08:30 +0000)]
[Sparc] Add software float option -msoft-float

Summary:
Following patch D19265 which enable software floating point support in the Sparc backend, this patch enables the option to be enabled in the front-end using the -msoft-float option.

The user should ensure a library (such as the builtins from Compiler-RT) that includes the software floating point routines is provided.

Reviewers: jyknight, lero_chris

Subscribers: jyknight, cfe-commits

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

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

8 years ago[OPENMP] Fixed codegen for firstprivate vars in standalone worksharing
Alexey Bataev [Tue, 24 May 2016 07:40:12 +0000 (07:40 +0000)]
[OPENMP] Fixed codegen for firstprivate vars in standalone worksharing
directives.

If firstprivate variable is is captured by value in outlined region and then used as firstprivate variable in inner worksharing directive, the copy for this firstprivate variable was not created. Fixed this bug.

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

8 years ago[MSVC2015] dllexport for defaulted special class members
Dmitry Polukhin [Tue, 24 May 2016 06:37:14 +0000 (06:37 +0000)]
[MSVC2015] dllexport for defaulted special class members

Clang doesn't dllexport defaulted special member function defaulted
inside class but does it if they defaulted outside class. MSVC doesn't
make any distinction where they were defaulted. Also MSVC 2013 and 2015
export different set of members. MSVC2015 doesn't emit trivial defaulted
x-tors but does emit copy assign operator.

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

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

8 years agoCodeGen: indicate to the backend the exception model
Saleem Abdulrasool [Tue, 24 May 2016 03:21:01 +0000 (03:21 +0000)]
CodeGen: indicate to the backend the exception model

Thread through -fsjlj-exceptions to the backend via the TargetOptions.  This is
in preparation for supporting SjLj exceptions on x86 (e.g. for MinGW).

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

8 years agoVisualize ellipses in TemplateTypeParm and TemplateTypeParmDecl
Mike Spertus [Tue, 24 May 2016 01:47:41 +0000 (01:47 +0000)]
Visualize ellipses in TemplateTypeParm and TemplateTypeParmDecl

Now a TemplateTypeParm will be visualized as typename ...T if it is a pack

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

8 years agoclang-c: de-anonymize structure declaration
Saleem Abdulrasool [Tue, 24 May 2016 01:23:24 +0000 (01:23 +0000)]
clang-c: de-anonymize structure declaration

The statement constructed an anonymous structure which was typedefed.  The
anonymous structure has internal linkage, and that would cause an error when
building with modules.  Give the type declaration a tag name to address the
error when building with modules.

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

8 years agoProperly track the found declaration (possibly a using-declaration) when
Richard Smith [Tue, 24 May 2016 00:01:49 +0000 (00:01 +0000)]
Properly track the found declaration (possibly a using-declaration) when
handling an explicit member specialization.

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

8 years agoVisualizer for Pack template arguments
Mike Spertus [Mon, 23 May 2016 22:27:44 +0000 (22:27 +0000)]
Visualizer for Pack template arguments

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

8 years ago[X86][SSE] Replace lossless i32/f32 to f64 conversion intrinsics with generic IR
Simon Pilgrim [Mon, 23 May 2016 22:13:02 +0000 (22:13 +0000)]
[X86][SSE] Replace lossless i32/f32 to f64 conversion intrinsics with generic IR

Both the (V)CVTDQ2PD(Y) (i32 to f64) and (V)CVTPS2PD(Y) (f32 to f64) conversion instructions are lossless and can be safely represented as generic __builtin_convertvector calls instead of x86 intrinsics without affecting final codegen.

This patch removes the clang builtins and their use in the sse2/avx headers - a future patch will deal with removing the llvm intrinsics, but that will require a bit more work.

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

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

8 years ago[CUDA] Add -fcuda-approx-transcendentals flag.
Justin Lebar [Mon, 23 May 2016 20:19:56 +0000 (20:19 +0000)]
[CUDA] Add -fcuda-approx-transcendentals flag.

Summary:
This lets us emit e.g. sin.approx.f32.  See
http://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-sin

Reviewers: rnk

Subscribers: tra, cfe-commits

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

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

8 years agoFix filtering of prior declarations when checking for a tag redeclaration to
Richard Smith [Mon, 23 May 2016 20:03:04 +0000 (20:03 +0000)]
Fix filtering of prior declarations when checking for a tag redeclaration to
map to the redecl context for both decls, not just one of them, and to properly
check that the decl contexts are equivalent.

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

8 years agoAddress post-commit review feedback to r270457
David Majnemer [Mon, 23 May 2016 17:32:35 +0000 (17:32 +0000)]
Address post-commit review feedback to r270457

Add two tests which show our error handling behavior for invalid
parameters in the layout_version and empty_bases attributes.

Amend our documentation to make it more clear that
__declspec(empty_bases) and __declspec(layout_version) can only apply to
classes, structs, and unions.

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