summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* IgnoringImplicit matcher.Cong Liu2016-06-241-0/+1
| | | | llvm-svn: 273659
* Use even more ArrayRefsDavid Majnemer2016-06-246-27/+20
| | | | | | No functional change is intended, just a small refactoring. llvm-svn: 273650
* Use more ArrayRefsDavid Majnemer2016-06-2435-140/+122
| | | | | | No functional change is intended, just a small refactoring. llvm-svn: 273647
* 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-231-2/+2
| | | | | | | | | | | | 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-231-3/+9
| | | | | | | | | | | | 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-232-0/+13
| | | | | | | | | | | | 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-2316-59/+198
| | | | llvm-svn: 273602
* Re-commit r273548, reverted in r273589, with a fix to not produceRichard Smith2016-06-239-333/+230
| | | | | | | | | | | | | | | | -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
* Revert r273548, "Rearrange condition handling so that semantic checks on a ↵Peter Collingbourne2016-06-239-229/+333
| | | | | | | | condition variable" as it caused a regression in -Wfor-loop-analysis. llvm-svn: 273589
* [Analyzer] Don't cache report generation ExplodedNodesBen Craig2016-06-232-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-235-16/+11
| | | | | | | | | | | | | 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-231-0/+10
| | | | | | | | 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-231-3/+0
| | | | | | | | | | | | | | | | | 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
* Rearrange condition handling so that semantic checks on a condition variableRichard Smith2016-06-239-333/+229
| | | | | | | | | 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-234-550/+466
| | | | llvm-svn: 273533
* Use ranges to concisely express iterationDavid Majnemer2016-06-2315-127/+102
| | | | | | | 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-221-1/+6
| | | | | | | | 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-221-0/+9
| | | | llvm-svn: 273454
* [analyzer] Teach ObjCDeallocChecker about XCTestCaseDevin Coughlin2016-06-221-9/+11
| | | | | | | | | | | 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-225-7/+20
| | | | | | | | | | | | | | | | 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-221-9/+11
| | | | | | | | | | | | | | 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-221-30/+16
| | | | | | | | 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-221-0/+2
| | | | | | | | | | | | | | 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-221-0/+32
| | | | | | 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-221-2/+3
| | | | | | avx512dqintrin.h. Also update the avx512dq test to not enable avx512vl feature so we can ensure correct dependencies. llvm-svn: 273388
* [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-221-7/+57
| | | | llvm-svn: 273378
* [analyzer] Teach trackNullOrUndefValue() about class property accessors.Devin Coughlin2016-06-221-1/+4
| | | | | | | | | | 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-211-0/+2
| | | | | | | | | | | | | | 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-2117-51/+109
| | | | | | | | | | MaterializeTemporaryExpr." Since D21243 fixes relative clang-tidy tests. This reverts commit a71d9fbd41e99def9159af2b01ef6509394eaeed. llvm-svn: 273312
* 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
* Revert "[MS] Don't expect vftables to be provided for extern template ↵Reid Kleckner2016-06-212-13/+10
| | | | | | | | instantiations" This reverts commit r273296, it broke the Windows self-host. llvm-svn: 273305
* Delete dead code.Rafael Espindola2016-06-212-60/+0
| | | | | | Found by gcc 6. llvm-svn: 273300
* Invoke PruneEH pass before Sample Profile pass.Dehao Chen2016-06-211-0/+1
| | | | | | | | | | | | Summary: We need to call PruneEH pass before AutoFDO pass so that some EH-related calls can get inlined in Sample Profile pass. Reviewers: davidxl, dnovillo Subscribers: junbuml, llvm-commits Differential Revision: http://reviews.llvm.org/D21197 llvm-svn: 273298
* [MS] Don't expect vftables to be provided for extern template instantiationsReid Kleckner2016-06-212-10/+13
| | | | | | | | | | | | | MSVC doesn't provide them. PR28223 I left behind the machinery in case we want to resurrect available_externally vftable emission to support devirtualization. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D21544 llvm-svn: 273296
* Added calculateRangesAfterReplaments() to calculate affacted ranges in the ↵Eric Liu2016-06-211-2/+38
| | | | | | | | | | | | | | | | new code. Summary: Added calculateRangesAfterReplaments() to calculate original ranges as well as newly affacted ranges in the new code. Reviewers: klimek, djasper Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D21547 llvm-svn: 273290
* clang-format: [JS] Add a Closure Compiler JSDoc tags to the defaultDaniel Jasper2016-06-211-1/+1
| | | | | | Google configuration so that it isn't line-wrapped. llvm-svn: 273285
* [AArch64] Change the preferred alignment for char and short to word alignmentEvandro Menezes2016-06-211-2/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D21414 llvm-svn: 273280
* [AVX512] Move the 128-bit and 256-bit lzcnt intrinsics to avx512vlcdintrin.h ↵Craig Topper2016-06-212-106/+105
| | | | | | where they belong. llvm-svn: 273249
* [CodeGen] Do not run initializers for imported variablesDavid Majnemer2016-06-211-0/+4
| | | | | | | | | | The export side is responsible for running any initializers, they are run when the module is first loaded. Attempting to run an initializer for the import side is not possible. This fixes PR28216. llvm-svn: 273237
* Add a ENABLE_X86_RELAX_RELOCATIONS cmake option.Rafael Espindola2016-06-201-1/+1
| | | | | | This corresponds to binutils' --enable-x86-relax-relocations. llvm-svn: 273224
* Remove MaxFunctionCount module flag annotation.Easwaran Raman2016-06-201-1/+0
| | | | | | Differential revision: http://reviews.llvm.org/D19184 llvm-svn: 273198
* clang-format: [Proto] Fix "import public" after r273179.Daniel Jasper2016-06-201-0/+2
| | | | llvm-svn: 273196
* [Sema] Only define function as move assignment when neededErik Pilkington2016-06-201-1/+1
| | | | | | | | Fixes PR27941, a crash on invalid. Differential revision: http://reviews.llvm.org/D20923 llvm-svn: 273193
OpenPOWER on IntegriCloud