Commit Graph

64343 Commits

Author SHA1 Message Date
Richard Smith 7541c32b2c Inline variables tentatively approved for C++17.
llvm-svn: 273680
2016-06-24 14:04:07 +00:00
Richard Smith 2517843eaf Updates from further motions.
llvm-svn: 273676
2016-06-24 13:25:08 +00:00
Strahinja Petrovic 7ba5bf5dc7 Fix make-check issues
Fixing build issue for test test/CodeGen/struct-union-BE.c.

llvm-svn: 273675
2016-06-24 13:11:15 +00:00
Richard Smith 3a2dc6f00c More approved features for C++17.
llvm-svn: 273668
2016-06-24 12:21:30 +00:00
Richard Smith 5bb7d7a84f Dynamic memory allocation with alignment has been approved for C++17.
llvm-svn: 273667
2016-06-24 12:16:11 +00:00
Richard Smith b7d7a046d8 Using for attributes voted into C++17.
llvm-svn: 273666
2016-06-24 12:15:12 +00:00
Strahinja Petrovic 515a1eb44c This patch fixes problem with passing structures and unions
smaller than register as argument in variadic functions on
big endian architectures.
Differential Revision: http://reviews.llvm.org/D21611

llvm-svn: 273665
2016-06-24 12:12:41 +00:00
Richard Smith 74f56e7de2 Add (commented out) status entries for the upcoming WG21 motions.
llvm-svn: 273662
2016-06-24 11:20:31 +00:00
Cong Liu 8a02efb143 IgnoringImplicit matcher.
llvm-svn: 273659
2016-06-24 09:38:03 +00:00
David Majnemer f11b9798f4 try to fix the MSVC build
llvm-svn: 273651
2016-06-24 05:48:59 +00:00
David Majnemer a3debed239 Use even more ArrayRefs
No functional change is intended, just a small refactoring.

llvm-svn: 273650
2016-06-24 05:33:44 +00:00
David Majnemer 59f7792136 Use more ArrayRefs
No functional change is intended, just a small refactoring.

llvm-svn: 273647
2016-06-24 04:05:48 +00:00
David Majnemer f440d267e3 Use the same underlying type for bitfields
MSVC allocates fresh storage for consecutive bitfields with different
underlying types.

llvm-svn: 273646
2016-06-24 04:05:35 +00:00
NAKAMURA Takumi ae9c904a4c Parser::ParseCXXCondition(): Prune \param in r273548 [-Wdocumentation]
llvm-svn: 273624
2016-06-23 22:47:59 +00:00
Martin Probst 31d6da7c0c clang-format: [JS] handle conditionals in fields, default params.
Summary:

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 273619
2016-06-23 21:51:49 +00:00
Dehao Chen bd3ed3c55b Invoke simplifycfg and sroa before instcombine.
Summary: InstCombine needs to be performed after simplifycfg and sroa, otherwise it may make bad optimization decisions.

Reviewers: davidxl, wmi, dnovillo

Subscribers: llvm-commits

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

llvm-svn: 273606
2016-06-23 20:13:10 +00:00
Martin Probst 1b7f98042d clang-format: [JS] recognize more type locations.
Summary: Includes parenthesized type expressions and type aliases.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 273603
2016-06-23 19:52:32 +00:00
Richard Smith b130fe7d31 Implement p0292r2 (constexpr if), a likely C++1z feature.
llvm-svn: 273602
2016-06-23 19:16:49 +00:00
Richard Smith 03a4aa3d00 Re-commit r273548, reverted in r273589, with a fix to not produce
-Wfor-loop-analysis warnings for a for-loop with a condition variable. In such
a case, the loop condition variable is modified on each iteration of the loop
by definition.

Original commit message:

Rearrange condition handling so that semantic checks on a condition variable
are performed before the other substatements of the construct are parsed,
rather than deferring them until the end. This allows better error recovery
from semantic errors in the condition, improves diagnostic order, and is a
prerequisite for C++17 constexpr if.

llvm-svn: 273600
2016-06-23 19:02:52 +00:00
Peter Collingbourne ae72fa2f97 Add a test case for the regression in -Wfor-loop-analysis caused by r273548.
llvm-svn: 273590
2016-06-23 18:11:19 +00:00
Peter Collingbourne b77ebd749a Revert r273548, "Rearrange condition handling so that semantic checks on a condition variable"
as it caused a regression in -Wfor-loop-analysis.

llvm-svn: 273589
2016-06-23 18:11:15 +00:00
Ben Craig 4067e35fae [Analyzer] Don't cache report generation ExplodedNodes
During the core analysis, ExplodedNodes are added to the
ExplodedGraph, and those nodes are cached for deduplication purposes.

After core analysis, reports are generated. Here, trimmed copies of
the ExplodedGraph are made. Since the ExplodedGraph has already been
deduplicated, there is no need to deduplicate again.

This change makes it possible to add ExplodedNodes to an
ExplodedGraph without the overhead of deduplication. "Uncached" nodes
also cannot be iterated over, but none of the report generation code
attempts to iterate over all nodes. This change reduces the analysis
time of a large .C file from 3m43.941s to 3m40.256s (~1.6% speedup).
It should slightly reduce memory consumption. Gains should be roughly
proportional to the number (and path length) of static analysis
warnings.

This patch enables future work that should remove the need for an
InterExplodedGraphMap inverse map. I plan on using the (now unused)
ExplodedNode link to connect new nodes to the original nodes.

http://reviews.llvm.org/D21229

llvm-svn: 273572
2016-06-23 15:47:12 +00:00
Rafael Espindola c9d336e549 Restructure the propagation of -fPIC/-fPIE.
The PIC and PIE levels are not independent. In fact, if PIE is defined
it is always the same as PIC.

This is clear in the driver where ParsePICArgs returns a PIC level and
a IsPIE boolean. Unfortunately that is currently lost and we pass two
redundant levels down the pipeline.

This patch keeps a bool and a PIC level all the way down to codegen.

llvm-svn: 273566
2016-06-23 15:07:32 +00:00
Aaron Ballman b06a359beb Fixing a FIXME related to Unicode support on Windows. Converted the Win32 APIs to explicitly use the W version when it involves strings that can hold non-ASCII characters (like file paths). Now explicitly using the A version for strings that will always be ASCII (like registry key paths).
No extra tests required as this is currently covered by existing testing, and this is basically impossible to write Unicode-specific tests for.

llvm-svn: 273563
2016-06-23 14:33:53 +00:00
Saleem Abdulrasool 6e9e88b30a CodeGen: support linker options on Windows ARM
We would incorrectly emit the directive sections due to the missing overridden
methods.  We now emit the expected "/DEFAULTLIB" rather than "-l" options for
requested linkage

llvm-svn: 273558
2016-06-23 13:45:33 +00:00
Daniel Jasper 7f3b99fca7 clang-format: [Proto] Use more compact format for text-formatted options
Before:
  enum Type {
    UNKNOWN = 0 [(some_options) = {
      a: aa,
      b: bb
    }];
  };

After:
  enum Type {
    UNKNOWN = 0 [(some_options) = {a: aa, b: bb}];
  };

llvm-svn: 273553
2016-06-23 09:40:19 +00:00
Daniel Sanders e6ca7b6a6b Attempt to fix MIPS buildbots after r273425.
MIPS has a 'signext' attribute that was causing the check to fail.

llvm-svn: 273552
2016-06-23 09:29:38 +00:00
Richard Smith 19f877c3f2 Rearrange condition handling so that semantic checks on a condition variable
are performed before the other substatements of the construct are parsed,
rather than deferring them until the end. This allows better error recovery
from semantic errors in the condition, improves diagnostic order, and is a
prerequisite for C++17 constexpr if.

llvm-svn: 273548
2016-06-23 08:41:20 +00:00
Craig Topper 79f53ca0b5 [AVX512] Replace masked unpack builtins with shufflevector and selects.
llvm-svn: 273533
2016-06-23 06:36:42 +00:00
David Majnemer f7e3609f77 Use ranges to concisely express iteration
No functional change is intended, this should just clean things up a
little.

llvm-svn: 273522
2016-06-23 00:15:04 +00:00
Simon Atanasyan b4abcc55a3 [driver][mips] Factor out findMIPSMultilibs code into separate functions. NFC
The findMIPSMultilibs is too long. One more reason for splitting is to
escape redundant calls of MultilibSet::FilterOut method which lead to
disk access.

llvm-svn: 273465
2016-06-22 20:00:50 +00:00
Vedant Kumar 049908b296 [Coverage] Push a new region when handling CXXTryStmts
Push a new region for the try block and propagate execution counts
through it. This ensures that catch statements get a region counter
distinct from the try block's counter.

llvm-svn: 273463
2016-06-22 19:57:58 +00:00
Reid Kleckner c4871eddb7 [codeview] Set the new IntroducedVirtual debug info flag
llvm-svn: 273454
2016-06-22 18:34:45 +00:00
Rafael Espindola 611b418d84 Make this test a bit more strict and fix it.
We do pass -pic-level to cc1 when targeting darwin. Given that codegen
itself doesn't use it, the only difference is whether __PIE__ and
__pie__ are defined.

llvm-svn: 273450
2016-06-22 18:04:52 +00:00
Devin Coughlin 9d5057cce5 [analyzer] Teach ObjCDeallocChecker about XCTestCase
Like with SenTestCase, subclasses of XCTestCase follow a "tear down" idiom to
release instance variables and so typically do not release ivars in -dealloc.
This commit applies the existing special casing for SenTestCase to XCTestCase
as well.

rdar://problem/25884696

llvm-svn: 273441
2016-06-22 17:03:10 +00:00
Hans Wennborg 44d061a471 Add support for /Ob1 and -finline-hint-functions flags
Add support for /Ob1 (and equivalent -finline-hint-functions), which enable
inlining only for functions marked inline, either explicitly (via inline
keyword, for example), or implicitly (function definition in class body,
for example).

This works by enabling inlining pass, and adding noinline attribute to
every function not marked inline.

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

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

llvm-svn: 273440
2016-06-22 16:56:16 +00:00
Hans Wennborg 9565cf581e Widen EHScope::ClenupBitFields::FixupDepth to avoid overflowing it (PR23490)
It currently only takes 2048 gotos to overflow the FixupDepth bitfield,
causing silent miscompilation. Apparently some parser generators run into
this (see PR).

I don't know that that data structure is terribly size sensitive anyway,
and since there's no room to widen the bitfield, let's just use a separate
word in EHCatchScope for it.

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

llvm-svn: 273434
2016-06-22 16:21:14 +00:00
Yaxun Liu ba28cba882 [OpenCL] Use function metadata to represent kernel attributes
This patch uses function metadata to represent reqd_work_group_size, work_group_size_hint and vector_type_hint kernel attributes and kernel argument info.

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

llvm-svn: 273425
2016-06-22 14:56:35 +00:00
Martin Probst dce8e4173b clang-format: [JS] Do not break before 'as'.
Summary:
'as' is a pseudo operator, so automatic semicolon insertion kicks in and the
code fails to part.

Reviewers: djasper

Subscribers: klimek

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

llvm-svn: 273422
2016-06-22 14:35:14 +00:00
Michael Zuckerman 716859aa64 [Clang][bmi][intrinsics] Adding _mm_tzcnt_64 _mm_tzcnt_32 intrinsics to clang.
Differential Revision: http://reviews.llvm.org/D21373

llvm-svn: 273401
2016-06-22 12:32:43 +00:00
Craig Topper 9ce3ddf2e6 [AVX512] Use a __v8hi vector inside of _mm_setzero_hi to match its name. Probably no real functional change.
llvm-svn: 273389
2016-06-22 06:36:23 +00:00
Craig Topper 08181f795f [AVX512] Fix _mm_setzero_di to not require avx512vl since its used by the avx512dqintrin.h. Also update the avx512dq test to not enable avx512vl feature so we can ensure correct dependencies.
llvm-svn: 273388
2016-06-22 06:36:21 +00:00
Craig Topper 67d8256c11 [AVX512] __builtin_ia32_reducesd_mask and __builtin_ia32_reducess_mask should not require avx512vl.
llvm-svn: 273387
2016-06-22 06:36:18 +00:00
Craig Topper c89dda5938 [AVX512] Add missing typecasts to intrinsics.
llvm-svn: 273386
2016-06-22 06:36:16 +00:00
Craig Topper d1691c7026 [AVX512] Replace masked integer cmp and ucmp builtins with native IR.
llvm-svn: 273378
2016-06-22 04:47:58 +00:00
Craig Topper c56f0f8485 [AVX512] Use correct types for mask parameters in avx512vlbw cmp builtin tests.
llvm-svn: 273377
2016-06-22 04:47:55 +00:00
Kelvin Li 7a6ec86fcc [OpenMP] Add the depend clause to target update construct (sema and parsing)
Differential Revision: http://reviews.llvm.org/D21532

llvm-svn: 273369
2016-06-22 03:10:32 +00:00
Peter Collingbourne aa463c2a18 Require an x86 target for the thinlto_backend.ll test.
llvm-svn: 273361
2016-06-22 01:40:47 +00:00
Peter Collingbourne 2ff9c25d93 Specify a target triple to fix the test on non-Linux.
llvm-svn: 273356
2016-06-22 01:17:30 +00:00
Peter Collingbourne e4755e595d Add missing test dependency.
llvm-svn: 273351
2016-06-22 01:03:15 +00:00