summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ASTImporter] Add test for importing anonymous namespaces.Raphael Isemann2019-01-212-0/+70
| | | | | | | | | | | | Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: a_sidorin, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D51178 llvm-svn: 351739
* [clang-tidy] Use getStripPluginsAdjusterKadir Cetinkaya2019-01-211-17/+1
| | | | | | | | | | | | Summary: See rC351531 for the introduction of getStripPluginsAdjuster. Reviewers: alexfh Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D56902 llvm-svn: 351738
* [llvm-symbolizer] Add -no-demangle as alias for -demangle=falseDmitry Venikov2019-01-213-2/+26
| | | | | | | | | | | | | | Summary: Provides -no-demangle as alias for -demangle=false. Motivation: https://bugs.llvm.org/show_bug.cgi?id=40075 Reviewers: jhenderson, ruiu Reviewed By: jhenderson Subscribers: erik.pilkington, rupprecht, llvm-commits Differential Revision: https://reviews.llvm.org/D56773 llvm-svn: 351735
* Fix test after AST dump output changeStephen Kelly2019-01-211-1/+1
| | | | llvm-svn: 351733
* Fix typos throughout the license files that somehow I and my reviewersChandler Carruth2019-01-2120-19/+20
| | | | | | | | | | | all missed! Thanks to Alex Bradbury for pointing this out, and the fact that I never added the intended `legacy` anchor to the developer policy. Add that anchor too. With hope, this will cause the links to all resolve successfully. llvm-svn: 351731
* [HWASAN] Improve tag mismatch diagnosticsEugene Leviant2019-01-214-13/+43
| | | | | | | | | Reports correct size and tags when either size is not power of two or offset to bad granule is not zero. Differential revision: https://reviews.llvm.org/D56603 llvm-svn: 351730
* [X86] Remove and autoupgrade vpmovqd/vpmovwb intrinsics using trunc+select.Craig Topper2019-01-2113-90/+214
| | | | llvm-svn: 351729
* Tentative fix for r351701 and gcc 6.2 build on ubuntuSerge Guelton2019-01-211-2/+3
| | | | llvm-svn: 351728
* [NFC] Make getExpressionSize unsigned shortMax Kazantsev2019-01-211-1/+1
| | | | llvm-svn: 351727
* [NFC] Fix warnings in unit test of r351725Max Kazantsev2019-01-211-6/+6
| | | | llvm-svn: 351726
* [SCEV][NFC] Introduces expression sizes estimationMax Kazantsev2019-01-214-10/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the field `ExpressionSize` in SCEV. This field is calculated only once on SCEV creation, and it represents the complexity of this SCEV from arithmetical point of view (not from the point of the number of actual different SCEV nodes that are used in the expression). Roughly saying, it is the number of operands and operations symbols when we print this SCEV. A formal definition is following: if SCEV `X` has operands `Op1`, `Op2`, ..., `OpN`, then Size(X) = 1 + Size(Op1) + Size(Op2) + ... + Size(OpN). Size of SCEVConstant and SCEVUnknown is one. Expression size may be used as a universal way to limit SCEV transformations for huge SCEVs. Currently, we have a bunch of options that represents various limits (such as recursion depth limit) that may not make any sense from the point of view of a LLVM users who is not familiar with SCEV internals, and all these different options pursue one goal. A more general rule that may potentially allow us to get rid of this redundancy in options is "do not make transformations with SCEVs of huge size". It can apply to all SCEV traversals and transformations that may need to visit a SCEV node more than once, hence they are prone to combinatorial explosions. This patch only introduces SCEV sizes calculation as NFC, its utilization will be introduced in follow-up patches. Differential Revision: https://reviews.llvm.org/D35989 Reviewed By: reames llvm-svn: 351725
* [RISCV] Add R_RISCV_RELAX relocation to all possible relax candidates.Kito Cheng2019-01-214-16/+73
| | | | | | | | | | | | Summary: Add R_RISCV_RELAX relocation to all possible relax candidates and update corresponding testcase. Reviewers: asb, apazos Differential Revision: https://reviews.llvm.org/D46677 llvm-svn: 351723
* [llgo]: fix compilation under current llvmKristina Brooks2019-01-212-8/+4
| | | | | | | | | | | | | | Patch rL322965 changed how intrinsics for memset and memzero were defined. This causes a regression in LLGO making it no longer buidable. In addition to that one pass was renamed, so this also addresses the pass naming disparity. I removed all split stack related bits from this patch as as asked. Differential Revision: https://reviews.llvm.org/D56638 llvm-svn: 351722
* [AVR] Insert unconditional branch when inserting MBBs between blocks with ↵Dylan McKay2019-01-212-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fallthrough This updates the AVR Select8/Select16 expansion code so that, when inserting the two basic blocks for true and false conditions, any existing fallthrough on the previous block is preserved. Prior to this patch, if the block before the Select pseudo fell through to the subsequent block, two new basic blocks would be inserted at the prior fallthrough point, changing the fallthrough destination. The predecessor or successor lists were not updated, causing the BranchFolding pass at -O1 and above the rearrange basic blocks, causing an infinite loop. Not to mention the unconditional fallthrough to the true block is incorrect in of itself. This patch modifies the Select8/16 expansion so that, if inserting true and false basic blocks at a fallthrough point, the implicit branch is preserved by means of an explicit, unconditional branch to the previous fallthrough destination. Thanks to Carl Peto for reporting this bug. This fixes avr-rust bug https://github.com/avr-rust/rust/issues/123. llvm-svn: 351721
* [AVR] Enable emission of debug informationDylan McKay2019-01-212-0/+13
| | | | | | | | | | | | | | Prior to this, the code was missing AVR-specific relocation logic in RelocVisitor.h. This patch teaches RelocVisitor about R_AVR_16 and R_AVR_32. Debug information is emitted in the final object file, and understood by 'avr-readelf --debug-dump' from AVR-GCC. llvm-dwarfdump is yet to understand how to dump AVR DWARF symbols. llvm-svn: 351720
* Revert "[AVR] Insert unconditional branch when inserting MBBs between blocks ↵Dylan McKay2019-01-212-74/+0
| | | | | | | | | | | | with fallthrough" This reverts commit r351718. Carl pointed out that the unit test could be improved. This patch will be recommitted once the test is made more resilient. llvm-svn: 351719
* [AVR] Insert unconditional branch when inserting MBBs between blocks with ↵Dylan McKay2019-01-212-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fallthrough This updates the AVR Select8/Select16 expansion code so that, when inserting the two basic blocks for true and false conditions, any existing fallthrough on the previous block is preserved. Prior to this patch, if the block before the Select pseudo fell through to the subsequent block, two new basic blocks would be inserted at the prior fallthrough point, changing the fallthrough destination. The predecessor or successor lists were not updated, causing the BranchFolding pass at -O1 and above the rearrange basic blocks, causing an infinite loop. Not to mention the unconditional fallthrough to the true block is incorrect in of itself. This patch modifies the Select8/16 expansion so that, if inserting true and false basic blocks at a fallthrough point, the implicit branch is preserved by means of an explicit, unconditional branch to the previous fallthrough destination. Thanks to Carl Peto for reporting this bug. This fixes avr-rust bug https://github.com/avr-rust/rust/issues/123. llvm-svn: 351718
* [fuzzer] Fix test checks broken after license header updateVitaly Buka2019-01-218-8/+8
| | | | llvm-svn: 351717
* [safestack] Remove unsupported platformsVitaly Buka2019-01-211-12/+6
| | | | llvm-svn: 351716
* [safestack] Fix FreeBSD runtime buildVitaly Buka2019-01-211-0/+4
| | | | llvm-svn: 351715
* [libFuzzer][MSVC] Make Sanitizer Coverage MSVC-compatibleJonathan Metzman2019-01-211-20/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Make Sanitizer Coverage work when compiled work when compiler-rt is compiled with MSVC. The previous solution did not work for MSVC because MSVC tried to align the .SCOV$CZ section even though we used __declspec(align(1)) on its only symbol: __stop___sancov_cntrs. Because the counter array is composed of 1 byte elements, it does not always end on an 8 or 4 byte boundary. This means that padding was sometimes added to added to align the next section, .SCOV$CZ. Use a different strategy now: instead of only instructing the compiler not to align the symbol, make the section one byte long by making its only symbol a uint8_t, so that the linker won't try to align it. Reviewers: morehouse, rnk Reviewed By: rnk Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D56866 llvm-svn: 351714
* [ASan] On Darwin record global allocator pointer and size in introspection ↵Dan Liew2019-01-211-1/+17
| | | | | | | | | | | | struct. This implements `mi_extra_init(...)` for the ASan allocator on Darwin and uses the `__lsan::GetAllocatorGlobalRange(...)` function to retrieve the allocator pointer and size. rdar://problem/45284065 llvm-svn: 351713
* On Darwin add allocator address and size fields toDan Liew2019-01-214-0/+28
| | | | | | | | | | | | | | `sanitizer_malloc_introspection_t` and initialize them to zero. We allow sanitizer implementations to perform different initialization by defining `COMMON_MALLOC_HAS_EXTRA_INTROSPECTION_INIT` to be `1` and providing an implementation of `mi_extra_init(...)`. We use these changes in future patches to implement malloc zone enumeration. rdar://problem/45284065 llvm-svn: 351712
* On Darwin allow for sanitizer malloc implementations to provide a zoneDan Liew2019-01-214-4/+22
| | | | | | | | | | | | | | | | enumerator. This is done by defining `COMMON_MALLOC_HAS_ZONE_ENUMERATOR` to `1` and then by providing an implementation of the `mi_enumerator(...)` function. If a custom implementation isn't desired the macro is set to `0` which causes a stub version (that fails) to be used. Currently all Darwin sanitizers that have malloc implementations define this to be `0` so there is no functionality change. rdar://problem/45284065 llvm-svn: 351711
* [Driver] Don't pass default value to getCompilerRTArgStringPetr Hosek2019-01-214-7/+7
| | | | | | | | Using static library is already a default. Differential Revision: https://reviews.llvm.org/D56043 llvm-svn: 351710
* [CMake][Fuchsia] Drop -DNDEBUG, re-enable modulesPetr Hosek2019-01-211-2/+3
| | | | | | | | | -DNDEBUG is no longer needed now that we don't enable assertions, modules should improve build times for the second stage. Differential Revision: https://reviews.llvm.org/D56972 llvm-svn: 351709
* [X86] Add missing test cases for some int/fp->fp conversion intrinsics with ↵Craig Topper2019-01-201-19/+75
| | | | | | | | | | rounding mode. Use non-default rounding mode on some tests. For some reason we were missing tests for several unmasked conversion intrinsics, but had their mask form. Also use a non-default rounding mode on some tests to provide better coverage for a future patch. llvm-svn: 351708
* Fix test after AST dump output changeStephen Kelly2019-01-201-1/+1
| | | | llvm-svn: 351707
* Tentative fix for r351701 and gcc 6.2 build on ubuntuSerge Guelton2019-01-201-4/+4
| | | | llvm-svn: 351706
* Tentative fix for r351701 and gcc 6.2 build on ubuntuSerge Guelton2019-01-201-2/+3
| | | | llvm-svn: 351705
* [safestack] Remove Darwin from supported platformsVitaly Buka2019-01-201-1/+1
| | | | | | r339720 already disabled it in the driver llvm-svn: 351704
* Try to port tests to AST dump changesStephen Kelly2019-01-205-13/+10
| | | | llvm-svn: 351703
* Add missing test fileSerge Guelton2019-01-201-0/+26
| | | | llvm-svn: 351702
* Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...>Serge Guelton2019-01-2053-212/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As noted in https://bugs.llvm.org/show_bug.cgi?id=36651, the specialization for isPodLike<std::pair<...>> did not match the expectation of std::is_trivially_copyable which makes the memcpy optimization invalid. This patch renames the llvm::isPodLike trait into llvm::is_trivially_copyable. Unfortunately std::is_trivially_copyable is not portable across compiler / STL versions. So a portable version is provided too. Note that the following specialization were invalid: std::pair<T0, T1> llvm::Optional<T> Tests have been added to assert that former specialization are respected by the standard usage of llvm::is_trivially_copyable, and that when a decent version of std::is_trivially_copyable is available, llvm::is_trivially_copyable is compared to std::is_trivially_copyable. As of this patch, llvm::Optional is no longer considered trivially copyable, even if T is. This is to be fixed in a later patch, as it has impact on a long-running bug (see r347004) Note that GCC warns about this UB, but this got silented by https://reviews.llvm.org/D50296. Differential Revision: https://reviews.llvm.org/D54472 llvm-svn: 351701
* AMDGPU: Legalize more bitcastsMatt Arsenault2019-01-202-10/+176
| | | | llvm-svn: 351700
* GlobalISel: Add isPointer legality predicatesMatt Arsenault2019-01-202-0/+20
| | | | llvm-svn: 351699
* AMDGPU/GlobalISel: Really legalize exts from i1Matt Arsenault2019-01-203-21/+44
| | | | | | | | There is a combine that was hiding these tests not actually testing what they should be, although they were producing the expected end result. llvm-svn: 351698
* [X86] Auto upgrade VPCOM/VPCOMU intrinsics to generic integer comparisonsSimon Pilgrim2019-01-207-200/+113
| | | | | | | | This causes a couple of changes in the upgrade tests as signed/unsigned eq/ne are equivalent and we constant fold true/false codes, these changes are the same as what we already do for avx512 cmp/ucmp. Noticed while cleaning up vector integer comparison costs for PR40376. llvm-svn: 351697
* GlobalISel: Implement widenScalar for basic FP opsMatt Arsenault2019-01-208-67/+511
| | | | llvm-svn: 351696
* AMDGPU/GlobalISel: Legalize f32->f16 fptruncMatt Arsenault2019-01-202-3/+20
| | | | llvm-svn: 351695
* [X86] Remove the cvtuqq2ps256/cvtqq2ps256 mask builtins. Replace with ↵Craig Topper2019-01-203-26/+24
| | | | | | | | | | | | | | uitofp/sitofp and select. Reviewers: RKSimon, spatel Reviewed By: RKSimon Subscribers: kristina, cfe-commits Differential Revision: https://reviews.llvm.org/D56965 llvm-svn: 351694
* AMDGPU/GlobalISel: Fix some crashs in g_unmerge_values/g_merge_valuesMatt Arsenault2019-01-203-16/+150
| | | | | | | | | | | This was crashing in the predicate function assuming the value is a vector. Copy more of what AArch64 uses. This probably needs more refinement later, but I don't exactly understand what it means in some cases, particularly since any legalization for these seems to be missing. llvm-svn: 351693
* AMDGPU/GlobalISel: Regbank select for fpextMatt Arsenault2019-01-202-0/+32
| | | | llvm-svn: 351692
* AMDGPU/GlobalISel: Cleanup legality for extensionsMatt Arsenault2019-01-205-12/+236
| | | | llvm-svn: 351691
* [X86] Auto upgrade old style VPCOM/VPCOMU intrinsics to generic integer ↵Simon Pilgrim2019-01-202-46/+71
| | | | | | | | | | | | comparisons We were upgrading these to the new style VPCOM/VPCOMU intrinsics (which includes the condition code immediate), but we'll be getting rid of those shortly, so convert these to generics first. This causes a couple of changes in the upgrade tests as signed/unsigned eq/ne are equivalent and we constant fold true/false codes, these changes are the same as what we already do for avx512 cmp/ucmp. Noticed while cleaning up vector integer comparison costs for PR40376. llvm-svn: 351690
* Fix bug in `AsanAllocatorASVT` (ASan) and `AllocatorASVT` (LSan) templated ↵Dan Liew2019-01-202-2/+4
| | | | | | | | | | | | | | alias. We forgot to pass `AddressSpaceView` to the `CombinedAllocator` which meant we would always use `LocalAddressSpaceView` for the `CombinedAllocator` leading to a static_assert failing when we tried to do `AsanAllocatorASVT<RemoteAddressSpaceView>` or `AllocatorASVT<RemoteAddressSpaceView>`. rdar://problem/45284065 llvm-svn: 351689
* [X86] Replace VPCOM/VPCOMU with generic integer comparisons (llvm)Simon Pilgrim2019-01-202-24/+24
| | | | | | | | | | These intrinsics can always be replaced with generic integer comparisons without any regression in codegen, even for -O0/-fast-isel cases. Noticed while cleaning up vector integer comparison costs for PR40376. A future commit will remove/autoupgrade the existing VPCOM/VPCOMU llvm intrinsics. llvm-svn: 351688
* [X86] Replace VPCOM/VPCOMU with generic integer comparisons (clang)Simon Pilgrim2019-01-203-72/+178
| | | | | | | | | | These intrinsics can always be replaced with generic integer comparisons without any regression in codegen, even for -O0/-fast-isel cases. Noticed while cleaning up vector integer comparison costs for PR40376. A future commit will remove/autoupgrade the existing VPCOM/VPCOMU llvm intrinsics. llvm-svn: 351687
* [clang-tidy] misc-non-private-member-variables-in-classes: ignore implicit ↵Miklos Vajna2019-01-203-10/+28
| | | | | | | | | | methods Otherwise we don't warn on a struct containing a single public int, but we warn on a struct containing a single public std::string, which is inconsistent. llvm-svn: 351686
* [CostModel][X86] Add explicit vector select costsSimon Pilgrim2019-01-2016-838/+1109
| | | | | | | | | | Prior to SSE41 (and sometimes on AVX1), vector select has to be performed as a ((X & C)|(Y & ~C)) bit select. Exposes a couple of issues with the min/max reduction costs (which only go down to SSE42 for some reason). The increase pre-SSE41 selection costs also prevent a couple of tests from firing any longer, so I've either tweaked the target or added AVX tests as well to the existing SSE2 tests. llvm-svn: 351685
OpenPOWER on IntegriCloud