summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* try to fix the MSVC buildDavid Majnemer2016-06-241-1/+2
| | | | llvm-svn: 273651
* Use even more ArrayRefsDavid Majnemer2016-06-248-38/+28
| | | | | | No functional change is intended, just a small refactoring. llvm-svn: 273650
* Use more ArrayRefsDavid Majnemer2016-06-2439-238/+174
| | | | | | No functional change is intended, just a small refactoring. llvm-svn: 273647
* Use the same underlying type for bitfieldsDavid Majnemer2016-06-248-33/+33
| | | | | | | MSVC allocates fresh storage for consecutive bitfields with different underlying types. llvm-svn: 273646
* Parser::ParseCXXCondition(): Prune \param in r273548 [-Wdocumentation]NAKAMURA Takumi2016-06-231-3/+0
| | | | llvm-svn: 273624
* clang-format: [JS] handle conditionals in fields, default params.Martin Probst2016-06-232-3/+11
| | | | | | | | | | | | Summary: Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D21658 llvm-svn: 273619
* Invoke simplifycfg and sroa before instcombine.Dehao Chen2016-06-233-3/+28
| | | | | | | | | | | | 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
* clang-format: [JS] recognize more type locations.Martin Probst2016-06-233-0/+19
| | | | | | | | | | | | Summary: Includes parenthesized type expressions and type aliases. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D21597 llvm-svn: 273603
* Implement p0292r2 (constexpr if), a likely C++1z feature.Richard Smith2016-06-2324-77/+477
| | | | llvm-svn: 273602
* Re-commit r273548, reverted in r273589, with a fix to not produceRichard Smith2016-06-2316-374/+295
| | | | | | | | | | | | | | | | -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
* Add a test case for the regression in -Wfor-loop-analysis caused by r273548.Peter Collingbourne2016-06-231-0/+6
| | | | llvm-svn: 273590
* Revert r273548, "Rearrange condition handling so that semantic checks on a ↵Peter Collingbourne2016-06-2316-294/+374
| | | | | | | | condition variable" as it caused a regression in -Wfor-loop-analysis. llvm-svn: 273589
* [Analyzer] Don't cache report generation ExplodedNodesBen Craig2016-06-233-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Restructure the propagation of -fPIC/-fPIE.Rafael Espindola2016-06-2312-36/+31
| | | | | | | | | | | | | 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
* Fixing a FIXME related to Unicode support on Windows. Converted the Win32 ↵Aaron Ballman2016-06-231-18/+27
| | | | | | | | 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
* CodeGen: support linker options on Windows ARMSaleem Abdulrasool2016-06-236-0/+20
| | | | | | | | 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
* clang-format: [Proto] Use more compact format for text-formatted optionsDaniel Jasper2016-06-232-8/+5
| | | | | | | | | | | | | | | | | 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
* Attempt to fix MIPS buildbots after r273425.Daniel Sanders2016-06-231-2/+2
| | | | | | MIPS has a 'signext' attribute that was causing the check to fail. llvm-svn: 273552
* Rearrange condition handling so that semantic checks on a condition variableRichard Smith2016-06-2316-374/+294
| | | | | | | | | 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
* [AVX512] Replace masked unpack builtins with shufflevector and selects.Craig Topper2016-06-239-666/+618
| | | | llvm-svn: 273533
* Use ranges to concisely express iterationDavid Majnemer2016-06-2318-184/+123
| | | | | | | No functional change is intended, this should just clean things up a little. llvm-svn: 273522
* [driver][mips] Factor out findMIPSMultilibs code into separate functions. NFCSimon Atanasyan2016-06-221-189/+185
| | | | | | | | 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
* [Coverage] Push a new region when handling CXXTryStmtsVedant Kumar2016-06-223-2/+26
| | | | | | | | 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
* [codeview] Set the new IntroducedVirtual debug info flagReid Kleckner2016-06-222-3/+23
| | | | llvm-svn: 273454
* Make this test a bit more strict and fix it.Rafael Espindola2016-06-221-7/+8
| | | | | | | | 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
* [analyzer] Teach ObjCDeallocChecker about XCTestCaseDevin Coughlin2016-06-222-9/+33
| | | | | | | | | | | 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
* Add support for /Ob1 and -finline-hint-functions flagsHans Wennborg2016-06-2211-10/+130
| | | | | | | | | | | | | | | | 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
* Widen EHScope::ClenupBitFields::FixupDepth to avoid overflowing it (PR23490)Hans Wennborg2016-06-222-9/+37
| | | | | | | | | | | | | | 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
* [OpenCL] Use function metadata to represent kernel attributesYaxun Liu2016-06-224-81/+93
| | | | | | | | 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
* clang-format: [JS] Do not break before 'as'.Martin Probst2016-06-222-2/+7
| | | | | | | | | | | | | | 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
* [Clang][bmi][intrinsics] Adding _mm_tzcnt_64 _mm_tzcnt_32 intrinsics to clang.Michael Zuckerman2016-06-222-0/+46
| | | | | | Differential Revision: http://reviews.llvm.org/D21373 llvm-svn: 273401
* [AVX512] Use a __v8hi vector inside of _mm_setzero_hi to match its name. ↵Craig Topper2016-06-221-1/+1
| | | | | | Probably no real functional change. llvm-svn: 273389
* [AVX512] Fix _mm_setzero_di to not require avx512vl since its used by the ↵Craig Topper2016-06-222-3/+4
| | | | | | avx512dqintrin.h. Also update the avx512dq test to not enable avx512vl feature so we can ensure correct dependencies. llvm-svn: 273388
* [AVX512] __builtin_ia32_reducesd_mask and __builtin_ia32_reducess_mask ↵Craig Topper2016-06-221-2/+2
| | | | | | should not require avx512vl. llvm-svn: 273387
* [AVX512] Add missing typecasts to intrinsics.Craig Topper2016-06-221-4/+4
| | | | llvm-svn: 273386
* [AVX512] Replace masked integer cmp and ucmp builtins with native IR.Craig Topper2016-06-225-339/+531
| | | | llvm-svn: 273378
* [AVX512] Use correct types for mask parameters in avx512vlbw cmp builtin tests.Craig Topper2016-06-221-144/+144
| | | | llvm-svn: 273377
* [OpenMP] Add the depend clause to target update construct (sema and parsing)Kelvin Li2016-06-223-12/+125
| | | | | | Differential Revision: http://reviews.llvm.org/D21532 llvm-svn: 273369
* Require an x86 target for the thinlto_backend.ll test.Peter Collingbourne2016-06-221-0/+2
| | | | llvm-svn: 273361
* Specify a target triple to fix the test on non-Linux.Peter Collingbourne2016-06-221-1/+1
| | | | llvm-svn: 273356
* Add missing test dependency.Peter Collingbourne2016-06-221-0/+1
| | | | llvm-svn: 273351
* CodeGen: Replace test/CodeGen/thinlto_backend.c with a functional test.Peter Collingbourne2016-06-223-14/+33
| | | | | | | | | | | This new test tests that functions are capable of being imported, rather than that the import pass is run. This new test is compatible with the approach being developed in D20268 which runs the importer on its own rather than in a pass. Differential Revision: http://reviews.llvm.org/D21542 llvm-svn: 273347
* Stmt.h: Tweak r273312 to avoid bool:1 to appease win32.NAKAMURA Takumi2016-06-221-1/+1
| | | | llvm-svn: 273343
* [analyzer] Teach trackNullOrUndefValue() about class property accessors.Devin Coughlin2016-06-222-1/+32
| | | | | | | | | | Teach trackNullOrUndefValue() how to properly look through PseudoObjectExprs to find the underlying semantic method call for property getters. This fixes a crash when looking through class property getters that I introduced in r265839. rdar://problem/26796666 llvm-svn: 273340
* Delete dead code.Rafael Espindola2016-06-211-96/+0
| | | | | | Found by gcc 6. llvm-svn: 273327
* Emit the DWARF tag for the RenderScript languagePirama Arumuga Nainar2016-06-212-0/+5
| | | | | | | | | | | | | | Summary: If the RenderScript LangOpt is set, either via '-x renderscript' or the '.rs' file extension, set the DWARF language tag to be that of RenderScript. Reviewers: rsmith Subscribers: cfe-commits, srhines Differential Revision: http://reviews.llvm.org/D21451 llvm-svn: 273321
* Trying to fix a buffer overflow that broke buildbot ↵Eric Liu2016-06-211-1/+1
| | | | | | sanitizer-x86_64-linux-fast/builds/13946. llvm-svn: 273319
* Re-commit "[Temporary] Add an ExprWithCleanups for each C++ ↵Tim Shen2016-06-2123-63/+181
| | | | | | | | | | MaterializeTemporaryExpr." Since D21243 fixes relative clang-tidy tests. This reverts commit a71d9fbd41e99def9159af2b01ef6509394eaeed. llvm-svn: 273312
* [x86] AVX FP compare builtins should require AVX target feature (PR28112)Sanjay Patel2016-06-212-5/+36
| | | | | | | | | | | | | | | | | This is a fix for PR28112: https://llvm.org/bugs/show_bug.cgi?id=28112 The FP comparison intrinsics that take an immediate parameter (rather than specifying a comparison predicate in the function name) were added with AVX; these are macros in avxintrin.h. This patch makes clang behavior match gcc (error if a program tries to use these without -mavx) and matches the Intel documentation, eg: VCMPPS: m128 _mm_cmp_ps(m128 a, __m128 b, const int imm) 'V' means this is intended to only work with the AVX form of the instruction. Differential Revision: http://reviews.llvm.org/D21306 llvm-svn: 273311
* Refactor scope building in JumpDiagnostics for simplicity. This fixes aRichard Smith2016-06-211-132/+151
| | | | | | | | | | | | (currently theoretical) bug where recursive calls to BuildScopeInformation would do the wrong thing if the type of the statement is one of the kinds with special handling, but this is not currently observable because the relevant recursive calls happen to all be for CompoundStmts. (This becomes visible with the C++17 'constexpr if' feature, where we get a protected scope for the 'then' / 'else' cases of some 'if's, and don't necessarily have a corresponding compound statement.) llvm-svn: 273309
OpenPOWER on IntegriCloud