summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* AMDGPU/NFC: Add offset field to arg metadata (required for code object v3)Konstantin Zhuravlyov2019-04-031-0/+4
| | | | llvm-svn: 357623
* [OpenMP][Stats] Fix stats gathering for distribute and team clauseJonathan Peyton2019-04-036-32/+107
| | | | | | | | | | | The distribute clause needs an explicit push of a timer. The teams clause needs a timer added and also, similarly to parallel, exchanged with the serial timer when encountered so that serial regions are counted properly. Differential Revision: https://reviews.llvm.org/D59801 llvm-svn: 357621
* Revert "[analyzer] Toning down invalidation a bit".Artem Dergachev2019-04-036-27/+28
| | | | | | | | | | | | | | | This reverts commit r352473. The overall idea is great, but it seems to cause unintented consequences when not only Region Store invalidation but also pointer escape mechanism was accidentally affected. Based on discussions in https://reviews.llvm.org/D58121#1452483 and https://reviews.llvm.org/D57230#1434161 Differential Revision: https://reviews.llvm.org/D57230 llvm-svn: 357620
* libcxx: Add _LIBCPP_NODISCARD_EXT to 38 more functionsNico Weber2019-04-034-84/+536
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This builds on the work done in r342808 and adds _LIBCPP_NODISCARD_EXT to 37 more functions, namely: adjacent_find, all_of, any_of, binary_search, clamp, count_if, count, equal_range, equal, find_end, find_first_not_of, find_first_of, find_if, find, includes, is_heap_until, is_heap, is_partitioned, is_permutation, is_sorted_until, is_sorted, lexicographical_compare, lower_bound, max_element, max, min_element, min, minmax_element, minmax, mismatch, none_of, remove_if, remove, search_n, search, unique, upper_bound The motivation here is that we noticed that find_if is nodiscard with Visual Studio's standard library, and we deemed that useful (https://crbug.com/948122). https://devblogs.microsoft.com/cppblog/c17-progress-in-vs-2017-15-5-and-15-6/ says "Our criteria for emitting the warning are: discarding the return value is a guaranteed leak [...], discarding the return value is near-guaranteed to be incorrect (e.g. remove()/remove_if()/unique()), or the function is essentially a pure observer (e.g. vector::empty() and std::is_sorted())." so I went through algorithm and tried to apply these criteria. Some of these, like vector::empty() are already nodiscard per C++ standard and didn't need changing. I didn't (yet?) go over std::string::find* methods which should probably have _LIBCPP_NODISCARD_EXT too (but not as part of this change). Differential Revision: https://reviews.llvm.org/D60145 llvm-svn: 357619
* Ensure correct pthread flags and libraries are usedDimitry Andric2019-04-037-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On most platforms, certain compiler and linker flags have to be passed when using pthreads, otherwise linking against libomp.so might fail with undefined references to several pthread functions. Use CMake's `find_package(Threads)` to determine these for standalone builds, or take them (and optionally modify them) from the top-level LLVM cmake files. Also, On FreeBSD, ensure that libomp.so is linked against libm.so, similar to NetBSD. Adjust test cases with hardcoded `-lpthread` flag to use the common build flags, which should now have the required pthread flags. Reviewers: emaste, jlpeyton, krytarowski, mgorny, protze.joachim, Hahnfeld Reviewed By: Hahnfeld Subscribers: AndreyChurbanov, tra, EricWF, Hahnfeld, jfb, jdoerfert, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D59451 llvm-svn: 357618
* [OPENMP]Add codegen for firstprivate vars with allocate clause.Alexey Bataev2019-04-034-18/+76
| | | | | | | Added codegen/test for the firstprivatized variables with the allocate clause. llvm-svn: 357617
* [libc++] Use std::is_nothrow_callable for std::invoke according to LWG 2807Louis Dionne2019-04-033-5/+10
| | | | | | | Thanks to Zoe Carver for the patch. Differential Revision: https://reviews.llvm.org/D58097 llvm-svn: 357616
* [X86] Extend boolean arguments to inline-asm according to getBooleanTypeKrzysztof Parzyszek2019-04-032-2/+22
| | | | | | Differential Revision: https://reviews.llvm.org/D60208 llvm-svn: 357615
* Add more benchmarks for literal strings.Samuel Benzaquen2019-04-031-10/+42
| | | | | | | | | | | | | | | | | | Summary: Comparing against the empty string should generate much better code that what it does today. We can also generate better code when comparing against literals that are larger than the SSO space. Reviewers: EricWF Subscribers: christof, jdoerfert, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D59781 llvm-svn: 357614
* [pstl] Improve the parallel version of std::equalLouis Dionne2019-04-032-4/+62
| | | | | | | | | | | When an execution policy is provided, we attempt to run std::equal in parallel instead of always doing it serially. Thanks to Mikhail Dvorskiy for the patch. Differential Revision: https://reviews.llvm.org/D59813 llvm-svn: 357613
* Revert "[LibTooling] Add Transformer, a library for source-to-source ↵Alexey Bataev2019-04-035-805/+0
| | | | | | | | | transformations." This reverts commit r357576 to fix the problem with the cyclic dependencies between libTooling and libToolingRefactor. llvm-svn: 357612
* [X86][AVX] combineHorizontalPredicateResult - split any/allof v16i16/v32i8 ↵Simon Pilgrim2019-04-033-30/+24
| | | | | | | | reduction on AVX1 Perform the 2 x 128-bit lo/hi OR/AND on the vectors before calling PMOVMSKB on the 128-bit result. llvm-svn: 357611
* Bug-40323: MS ABI adding template static member in the linker directive ↵Jennifer Yu2019-04-032-0/+63
| | | | | | section to make sure init function can be called before main. llvm-svn: 357610
* [pstl] Require C++17 when linking against pstlLouis Dionne2019-04-031-0/+1
| | | | llvm-svn: 357609
* [X86][AVX] combineHorizontalPredicateResult - support v16i16/v32i8 reduction ↵Simon Pilgrim2019-04-033-72/+50
| | | | | | | | on AVX1 Use getPMOVMSKB helper which splits v32i8 MOVMSK calls on pre-AVX2 targets. llvm-svn: 357608
* [DWARF] check whether the DIE is valid before querying for informationPaul Semel2019-04-032-0/+14
| | | | | | Differential Revision: https://reviews.llvm.org/D60147 llvm-svn: 357607
* [libunwind] Do not share an object library to create the static/shared librariesPetr Hosek2019-04-031-37/+12
| | | | | | This change is similar to r356150, with the same motivation. llvm-svn: 357606
* [AArch64][GlobalISel] Legalize G_FEXP2Jessica Paquette2019-04-035-3/+269
| | | | | | | | | Same as G_EXP. Add a test, and update legalizer-info-validation.mir and f16-instructions.ll. Differential Revision: https://reviews.llvm.org/D60165 llvm-svn: 357605
* [x86] make stack folding tests immune to unrelated transforms; NFCSanjay Patel2019-04-031-21/+21
| | | | llvm-svn: 357604
* Attempt #2 to get this patch working. I will watch the build bots carefully ↵Greg Clayton2019-04-036-7/+116
| | | | | | | | | | | | | | | | today. Allow partial UUID matching in Minidump core file plug-in Breakpad had bugs in earlier versions where it would take a 20 byte ELF build ID and put it into the minidump file as a 16 byte PDB70 UUID with an age of zero. This would make it impossible to do postmortem debugging with one of these older minidump files. This fix allows partial matching of UUIDs. To do this we first try and match with the full UUID value, and then fall back to removing the original directory path from the module specification and we remove the UUID requirement, and then manually do the matching ourselves. This allows scripts to find symbols files using a symbol server, place them all in a directory, use the "setting set target.exec-search-paths" setting to specify the directory, and then load the core file. The Target::GetSharedModule() can then find the correct file without doing any other matching and load it. Tests were added to cover a partial UUID match where the breakpad file has a 16 byte UUID and the actual file on disk has a 20 byte UUID, both where the first 16 bytes match, and don't match. Differential Revision: https://reviews.llvm.org/D60001 llvm-svn: 357603
* [DAGCombiner] Rename variables Demanded -> DemandedBits/DemandedElts. NFCI.Simon Pilgrim2019-04-031-9/+10
| | | | | | Use consistent variable names down the SimplifyDemanded* call stack so debugging isn't such a annoyance. llvm-svn: 357602
* Test commit: Remove double variable assignmentLewis Revill2019-04-031-1/+1
| | | | llvm-svn: 357601
* [LLDB] - Update the test cases after yaml2obj change.George Rimar2019-04-039-176/+184
| | | | | | | | | https://reviews.llvm.org/D60122 (r357595) changed the symbols description format in yaml2obj. This change updates the LLDB tests. llvm-svn: 357600
* [clang-format] Do not emit replacements while regrouping if Cpp includes are OKKrasimir Georgiev2019-04-032-13/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently clang-format would always emit a replacement for multi-block #include sections if `IBS_Regroup`, even if the sections are correct: ``` % cat ~/test.h #include <a.h> #include "b.h" % bin/clang-format --output-replacements-xml -style=google ~/test.h <?xml version='1.0'?> <replacements xml:space='preserve' incomplete_format='false'> <replacement offset='0' length='30'>#include &lt;a.h>&#10;&#10;#include "b.h"</replacement> </replacements> % ``` This change makes clang-format not emit replacements in this case. The logic is similar to the one implemented for Java in r354452. Reviewers: ioeric Reviewed By: ioeric Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60199 llvm-svn: 357599
* [llvm-readobj] - Fix 2 test cases.George Rimar2019-04-032-4/+4
| | | | | | | | | | https://reviews.llvm.org/D60122 (r357595) changed the symbols description format. This change fix two more new test cases to fix BB: http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/16205/steps/test-stage1-compiler/logs/stdio llvm-svn: 357598
* [SystemZ] Improve codegen for certain SADDO-immediate casesUlrich Weigand2019-04-033-6/+85
| | | | | | | | | | | | When performing an add-with-overflow with an immediate in the range -2G ... -4G, code currently loads the immediate into a register, which generally takes two instructions. In this particular case, it is preferable to load the negated immediate into a register instead, which always only requires one instruction, and then perform a subtract. llvm-svn: 357597
* [LLD] - Update the test cases after yaml2obj change.George Rimar2019-04-0337-296/+281
| | | | | | | | | https://reviews.llvm.org/D60122 (r357595) changed the symbols description format. This change updates the LLD tests. llvm-svn: 357596
* [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when ↵George Rimar2019-04-03119-1342/+1409
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parsing/dumping. Currently, YAML has the following syntax for describing the symbols: Symbols: Local: LocalSymbol1: ... LocalSymbol2: ... ... Global: GlobalSymbol1: ... Weak: ... GNUUnique: I.e. symbols are grouped by their bindings. That is not very convenient, because: It does not allow to set a custom binding, what can be useful for producing broken/special outputs for test cases. Adding a new binding would require to change a syntax (what we observed when added GNUUnique recently). It does not allow to change the order of the symbols in .symtab/.dynsym, i.e. currently all Local symbols are placed first, then Global, Weak and GNUUnique are following, but we are not able to change the order. It is not consistent. Binding is just one of the properties of the symbol, we do not group them by other properties. It makes the code more complex that it can be. This patch shows it can be simplified with the change performed. The patch changes the syntax to just: Symbols: Symbol1: ... Symbol2: ... ... With that, we are able to work with the binding field just like with any other symbol property. Differential revision: https://reviews.llvm.org/D60122 llvm-svn: 357595
* [NFC] Address missed review comment for testJames Henderson2019-04-032-1/+5
| | | | | | | | Reviewed by: grimar Differential Revision: https://reviews.llvm.org/D60200 llvm-svn: 357594
* [x86] remove duplicate testsSanjay Patel2019-04-031-231/+0
| | | | | | Accidentally double-committed these. llvm-svn: 357593
* [x86] add negative tests for FP scalarization; NFCSanjay Patel2019-04-031-0/+82
| | | | | | These go with the proposal in D60150. llvm-svn: 357592
* [x86] add tests with constants for FP scalarization; NFCSanjay Patel2019-04-031-0/+231
| | | | llvm-svn: 357591
* [llvm-objcopy] Make section rename/set flags case-insensitiveJames Henderson2019-04-033-12/+30
| | | | | | | | | | | | This fixes https://bugs.llvm.org/show_bug.cgi?id=41305. GNU objcopy --set-section-flags/--rename-section flags are case-insensitive, so this patch updates llvm-objcopy to match. Reviewed by: grimar Differential Revision: https://reviews.llvm.org/D60200 llvm-svn: 357590
* Whitespace and formatting changes; NFC.Aaron Ballman2019-04-031-6/+5
| | | | llvm-svn: 357589
* [libc++][NFC] Rename test file according to the libc++ conventionLouis Dionne2019-04-031-0/+0
| | | | llvm-svn: 357588
* [x86] add tests with constants for FP scalarization; NFCSanjay Patel2019-04-031-0/+231
| | | | llvm-svn: 357587
* [libc++] (Take 2) Correctly handle Objective-C++ ARC qualifiers in ↵Louis Dionne2019-04-032-1/+73
| | | | | | | | | | | | | | | | | | | | | std::is_pointer Summary: Otherwise, std::is_pointer<id __strong> works, but std::is_pointer<id __weak> (and others) don't work as expected. The previous patch (r357517) had to be reverted in r357569 because it broke the Chromium build. This patch shouldn't have the same problem. rdar://problem/49126333 Reviewers: ahatanak, EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D60087 llvm-svn: 357586
* Add a new attribute documentation category for declarations.Aaron Ballman2019-04-032-20/+22
| | | | | | This moves documentation for some attributes into new categories that are hopefully a bit more clear. In general, "Type" documentation should be for attributes that appertain to types while "Declaration" documentation should be for attributes that appertain to declarations other than functions or variables. llvm-svn: 357585
* [MIPS GlobalISel] Select floating point arithmetic operationsPetar Avramovic2019-04-036-5/+878
| | | | | | | | Select 32 and 64 bit floating point add, sub, mul and div for MIPS32. Differential Revision: https://reviews.llvm.org/D60191 llvm-svn: 357584
* [AArch64] Update v8.5a MTE LDG/STG instructionsJaved Absar2019-04-034-284/+480
| | | | | | | | | | | | | The latest MTE specification adds register Xt to the STG instruction family: STG [Xn, #offset] -> STG Xt, [Xn, #offset] The tag written to memory is taken from Xt rather than Xn. Also, the LDG instruction also was changed to read return address from Xt: LDG Xt, [Xn, #offset]. This patch includes those changes and tests. Specification is at: https://developer.arm.com/docs/ddi0596/c Differential Revision: https://reviews.llvm.org/D60188 llvm-svn: 357583
* [clang-tidy] Remove the old ClangTidyCheck::registerPPCallbacks methodAlexander Kornienko2019-04-034-6/+0
| | | | | | | | | | | | | | | | | | Summary: All in-tree clang-tidy checks have been migrated to the new ClangTidyCheck::registerPPCallbacks method. Time to drop the old one. Reviewers: sammccall, hokein Reviewed By: hokein Subscribers: xazax.hun, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60197 llvm-svn: 357582
* AMDGPU: Fix copy/paste error in intrnsic commentMatt Arsenault2019-04-031-1/+1
| | | | llvm-svn: 357581
* [DAGCombiner] loosen restrictions for moving shuffles after vector binopSanjay Patel2019-04-037-70/+52
| | | | | | | | | | | | There are 3 changes to make this correspond to the same transform in instcombine: 1. Remove the legality check - we can't create anything less legal than we started with. 2. Ease the use restriction, so we only bail out if both operands have >1 use. 3. Ease the use restriction for binops with a repeated operand (eg, mul x, x). As discussed in D60150, there's a scalarization opportunity that will be made easier by allowing this transform more generally. llvm-svn: 357580
* Fixing a typo; NFC.Aaron Ballman2019-04-032-2/+2
| | | | llvm-svn: 357579
* [llvm-readobj] Add GNU style dumper for .gnu.version sectionXing GUO2019-04-034-3/+144
| | | | | | | | | | | | | | | | Summary: Currently, `llvm-readobj` do not support GNU style dumper for symbol versioning sections. In this patch, I would like to implement dumper for `.gnu.version` section Reviewers: jhenderson, rupprecht, grimar Reviewed By: jhenderson, rupprecht Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59877 llvm-svn: 357578
* Fix typos in tests. NFC.Xing GUO2019-04-032-2/+2
| | | | | | | | | | | | | | Reviewers: Higuoxing Reviewed By: Higuoxing Subscribers: kubamracek, cfe-commits, #sanitizers, llvm-commits Tags: #clang, #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D60183 llvm-svn: 357577
* [LibTooling] Add Transformer, a library for source-to-source transformations.Yitzhak Mandelbaum2019-04-035-0/+805
| | | | | | | | | | | | | | | | Summary: Adds a basic version of Transformer, a library supporting the concise specification of clang-based source-to-source transformations. A full discussion of the end goal can be found on the cfe-dev list with subject "[RFC] Easier source-to-source transformations with clang tooling". Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: mgorny, jfb, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59376 llvm-svn: 357576
* [llvm-nm]Add support for --no-demangleJames Henderson2019-04-032-3/+17
| | | | | | | | | | | | | GNU nm has --no-demangle, so llvm-nm should too. It disables the --demangle switch. The patch also allows --demangle to be specified multiple times (the last of all --no-demangle/--demangle switches takes precedence). Reviewed by: grimar, rupprecht, mattd Differential Revision: https://reviews.llvm.org/D60134 llvm-svn: 357575
* gn build: Add build files for clangd xpc framework codeNico Weber2019-04-037-4/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a bit of a larger change since this is the first (and as far as I can tell only) place where the LLVM build produces macOS framework bundles. GN has some built-in support for this, so use that. `gn help create_bundle` has a terse description (but it's a bit outdated: `deps` must be `public_deps` and the conditionals in the example in the help aren't quite right on non-iOS). We need a new 'copy_bundle_data' tool, and since we copy the clangd.xpc bundle as bundle_data into ClangdXPC.framework it needs to be able to handle directories in addition to files. GN also insists we have a compile_xcassets tool even though it's not used. I just made that run `false`. Despite GN's support for bundles, we still need to manually create the expected symlink structure in the .framework bundle. Since this code never runs on Windows, it's safe to create the symlinks before the symlink targets exist, so we can just make the bundle depend on the steps that create the symlinks. For this to work, change the symlink script to create the symlink's containing directory if it doesn't yet exist. I locally verified that CMake and GN build create the same bundle structure. (I noticed that both builds set LC_ID_DYLIB to the pre-copy libClangdXPCLib.dylib name, but that seems to not cause any issues and it happens in the CMake build too.) (Also add an error message to clangd-xpc-test-client for when loading the dylib fails – this was useful while locally debugging this.) Differential Revision: https://reviews.llvm.org/D60130 llvm-svn: 357574
* [X86] Regenerate LEA codegen testsSimon Pilgrim2019-04-031-23/+57
| | | | llvm-svn: 357573
OpenPOWER on IntegriCloud