summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Option] Add 'findNearest' method to catch typosBrian Gesiak2018-01-056-3/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add a method `OptTable::findNearest`, which allows users of OptTable to check user input for misspelled options. In addition, have llvm-mt check for misspelled options. For example, if a user invokes `llvm-mt /oyt:foo`, the error message will indicate that while an option named `/oyt:` does not exist, `/out:` does. The method ports the functionality of the `LookupNearestOption` method from LLVM CommandLine to libLLVMOption. This allows tools like Clang and Swift, which do not use CommandLine, to use this functionality to suggest similarly spelled options. As room for future improvement, the new method as-is cannot yet properly suggest nearby "joined" options -- that is, for an option string "-FozBar", where "-Foo" is the correct option name and "Bar" is the value being passed along with the misspelled option, this method will calculate an edit distance of 4, by deleting "Bar" and changing "z" to "o". It should instead calculate an edit distance of just 1, by changing "z" to "o" and recognizing "Bar" as a value. This commit includes a disabled test that expresses this limitation. Test Plan: `check-llvm` Reviewers: yamaguchi, v.g.vassilev, teemperor, ruiu, jroelofs Reviewed By: jroelofs Subscribers: jroelofs, llvm-commits Differential Revision: https://reviews.llvm.org/D41732 llvm-svn: 321877
* [llvm-cov] Temporarily disable multithreaded-report.test on Windows.Max Moroz2018-01-051-0/+4
| | | | | | | | | | | | Summary: The test is failing because Windows do not support "diff -r". Reviewers: Dor1s Reviewed By: Dor1s Differential Revision: https://reviews.llvm.org/D41768 llvm-svn: 321876
* add 'REQUIRES: object-emission' to testAdrian Prantl2018-01-051-0/+1
| | | | llvm-svn: 321875
* remove unnecessary target triple from generic testAdrian Prantl2018-01-051-4/+0
| | | | llvm-svn: 321874
* [BasicAA] Fix linearization of shifts beyond the bitwidth.Davide Italiano2018-01-052-0/+24
| | | | | | | Thanks to Simon Pilgrim for the reduced testcase. Fixes PR35821. llvm-svn: 321873
* [SLP] Update more test checks, NFC.Alexey Bataev2018-01-052-111/+143
| | | | llvm-svn: 321872
* [llvm-cov] Multi-threaded implementation of prepareFileReports method.Max Moroz2018-01-0515-33/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Local testing has demonstrated a great speed improvement, compare the following: 1) Existing version: ``` $ time llvm-cov show -format=html -output-dir=report -instr-profile=... ... The tool has been launched: 00:00:00 Loading coverage data: 00:00:00 Get unique source files: 00:00:33 Creating an index out of the source files: 00:00:34 Going into prepareFileReports: 00:00:34 Going to emit summary information for each file: 00:28:55 <-- 28:21 min! Going to emit links to files with no function: 00:28:55 Launching 32 threads for generating HTML files: 00:28:55 real 37m43.651s user 112m5.540s sys 7m39.872s ``` 2) Multi-threaded version with 32 CPUs: ``` $ time llvm-cov show -format=html -output-dir=report -instr-profile=... ... The tool has been launched: 00:00:00 Loading coverage data: 00:00:00 Get unique source files: 00:00:38 Creating an index out of the source files: 00:00:40 Going into prepareFileReports: 00:00:40 Preparing file reports using 32 threads: 00:00:40 # Creating thread tasks for the following number of files: 16422 Going to emit summary information for each file: 00:01:57 <-- 1:17 min! Going to emit links to files with no function: 00:01:58 Launching 32 threads for generating HTML files: 00:01:58 real 11m2.044s user 134m48.124s sys 7m53.388s ``` Reviewers: vsk, morehouse Reviewed By: vsk Subscribers: Dor1s, llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D41206 llvm-svn: 321871
* [SLP] Update test checks, NFC.Alexey Bataev2018-01-051-22/+140
| | | | llvm-svn: 321870
* [SLP] Update tests checks, NFC.Alexey Bataev2018-01-052-9/+18
| | | | llvm-svn: 321869
* [X86] Regenerate illegal move testSimon Pilgrim2018-01-051-4/+17
| | | | | | Recommitting after fixing case-sensitive issue in the RUN command llvm-svn: 321868
* [clangd] Fix memory leak in code completionIlya Biryukov2018-01-051-0/+1
| | | | llvm-svn: 321867
* [ARM] Issue an erorr when non-general-purpose registers are used in address ↵Momchil Velikov2018-01-052-8/+81
| | | | | | | | | | | | operands Currently the assembler would accept, e.g. `ldr r0, [s0, #12]` and similar. This patch add checks that only general-purpose registers are used in address operands, shifted registers, and shift amounts. Differential revision: https://reviews.llvm.org/D39910 llvm-svn: 321866
* [AArch64] Fix -mcpu option in aarch64-combine-fmul-fsub.mir (NFC)Florian Hahn2018-01-051-1/+1
| | | | llvm-svn: 321865
* Add a tool executor that runs actions on all TUs in the compilation database.Eric Liu2018-01-055-2/+314
| | | | | | | | | | | | Summary: Tool results are deduplicated by the result key. Reviewers: hokein Subscribers: klimek, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D41729 llvm-svn: 321864
* [DebugInfo] Don't crash when given invalid DWARFv5 line table prologue.Jonas Devlieghere2018-01-055-7/+17
| | | | | | | | | | | | | This patch replaces an assertion with an explicit check for the validity of the FORM parameters. The assertion was triggered when the DWARFv5 line table contained a zero address size. This fixes OSS-Fuzz Issue 4644 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4644 Differential revision: https://reviews.llvm.org/D41615 llvm-svn: 321863
* [DAGCombine] Fix for PR37563Sam Parker2018-01-053-14/+21
| | | | | | | | | | | | While searching for loads to be narrowed, equal sized loads were not added to the list, resulting in anyext loads not being converted to zext loads. https://bugs.llvm.org/show_bug.cgi?id=35763 Differential Revision: https://reviews.llvm.org/D41628 llvm-svn: 321862
* Commit new test file forgotten in previous commitStephan Bergmann2018-01-051-0/+15
| | | | llvm-svn: 321861
* o -fsanitize=function warning when calling noexcept function through ↵Stephan Bergmann2018-01-051-1/+41
| | | | | | | | | | | | | | | | | | | | | | non-noexcept pointer in C++17 As discussed in the mail thread <https://groups.google.com/a/isocpp.org/forum/ #!topic/std-discussion/T64_dW3WKUk> "Calling noexcept function throug non- noexcept pointer is undefined behavior?", such a call should not be UB. However, Clang currently warns about it. This change removes exception specifications from the function types recorded for -fsanitize=function, both in the functions themselves and at the call sites. That means that calling a non-noexcept function through a noexcept pointer will also not be flagged as UB. In the review of this change, that was deemed acceptable, at least for now. (See the "TODO" in compiler-rt test/ubsan/TestCases/TypeCheck/Function/function.cpp.) This is the compiler-rt part of a patch covering both cfe and compiler-rt. Differential Revision: https://reviews.llvm.org/D40720 llvm-svn: 321860
* No -fsanitize=function warning when calling noexcept function through ↵Stephan Bergmann2018-01-056-25/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | non-noexcept pointer in C++17 As discussed in the mail thread <https://groups.google.com/a/isocpp.org/forum/ #!topic/std-discussion/T64_dW3WKUk> "Calling noexcept function throug non- noexcept pointer is undefined behavior?", such a call should not be UB. However, Clang currently warns about it. This change removes exception specifications from the function types recorded for -fsanitize=function, both in the functions themselves and at the call sites. That means that calling a non-noexcept function through a noexcept pointer will also not be flagged as UB. In the review of this change, that was deemed acceptable, at least for now. (See the "TODO" in compiler-rt test/ubsan/TestCases/TypeCheck/Function/function.cpp.) To remove exception specifications from types, the existing internal ASTContext::getFunctionTypeWithExceptionSpec was made public, and some places otherwise unrelated to this change have been adapted to call it, too. This is the cfe part of a patch covering both cfe and compiler-rt. Differential Revision: https://reviews.llvm.org/D40720 llvm-svn: 321859
* [ORC] Re-revert r321838: Tests are still failing.Lang Hames2018-01-058-832/+4
| | | | llvm-svn: 321858
* [GISel]: Don't create G_MUL with 1 during translation of GEPAditya Nandakumar2018-01-052-7/+21
| | | | | | | When element size is 1, it's just wasteful to create MUL with 1. https://reviews.llvm.org/D41738 llvm-svn: 321857
* [ArchSpec] Don't consider Unknown MachO64 as invalid.Davide Italiano2018-01-051-1/+6
| | | | | | | | Even without a proper arch we can access line tables, etc.. <rdar://problem/35778442> llvm-svn: 321856
* Reapply r321781: [Modules] Allow modules specified by -fmodule-map-file to ↵Bruno Cardoso Lopes2018-01-0523-52/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | shadow implicitly found ones When modules come from module map files explicitly specified by -fmodule-map-file= arguments, allow those to override/shadow modules with the same name that are found implicitly by header search. If such a module is looked up by name (e.g. @import), we will always find the one from -fmodule-map-file. If we try to use a shadowed module by including one of its headers report an error. This enables developers to force use of a specific copy of their module to be used if there are multiple copies that would otherwise be visible, for example if they develop modules that are installed in the default search paths. Patch originally by Ben Langmuir, http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20151116/143425.html Based on cfe-dev discussion: http://lists.llvm.org/pipermail/cfe-dev/2015-November/046164.html Differential Revision: https://reviews.llvm.org/D31269 rdar://problem/23612102 llvm-svn: 321855
* NFC.Evgeny Stupachenko2018-01-051-0/+1
| | | | | | | | | The patch fixes r321395, that cuased -Werror=unused-but-set-variable issue for Diagnosed var on prod build. From: Evgeny Stupachenko <evstupac@gmail.com> llvm-svn: 321854
* [ORC] Re-apply r321838 - Addition of new ORC core APIs.Lang Hames2018-01-058-4/+832
| | | | | | | | The original commit broke the builders due to a think-o in an assertion: AsynchronousSymbolQuery's constructor needs to check the callback member variables, not the constructor arguments. llvm-svn: 321853
* Move + and * operators of MoveOnly into MoveOnly.h.Billy Robert O'Neal III2018-01-052-11/+2
| | | | llvm-svn: 321852
* Fix incorrect handling of move-only types in transform_reduce iter iter iter ↵Billy Robert O'Neal III2018-01-052-1/+23
| | | | | | init, and add test. llvm-svn: 321851
* Automated trailing whitespace removal by VS Code.Billy Robert O'Neal III2018-01-051-18/+18
| | | | llvm-svn: 321850
* Add move-only types test to transform_reduce iter iter iter init op op.Billy Robert O'Neal III2018-01-051-0/+14
| | | | llvm-svn: 321849
* Add move-only types test for transform_reduce bop/uop.Billy Robert O'Neal III2018-01-051-0/+13
| | | | llvm-svn: 321848
* Fix nonstandard bits in transform_reduce_iter_iter_init_bop_uop.Billy Robert O'Neal III2018-01-051-43/+27
| | | | | | | | * _VSTD should be std. * <utility> is needed for forward. * unary_function is no longer standard (and unnecessary for this, a C++17-only test) llvm-svn: 321847
* Remove redundant testAdrian Prantl2018-01-051-8/+0
| | | | llvm-svn: 321846
* Debug Info: Support DW_AT_calling_convention on composite types.Adrian Prantl2018-01-052-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | This implements the DWARF 5 feature described at http://www.dwarfstd.org/ShowIssue.php?issue=141215.1 This allows a consumer to understand whether a composite data type is trivially copyable and thus should be passed by value instead of by reference. The canonical example is being able to distinguish the following two types: // S is not trivially copyable because of the explicit destructor. struct S { ~S() {} }; // T is a POD type. struct T { ~T() = default; }; <rdar://problem/36034993> Differential Revision: https://reviews.llvm.org/D41039 llvm-svn: 321845
* Debug Info: Support DW_AT_calling_convention on composite types.Adrian Prantl2018-01-057-3/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements the DWARF 5 feature described at http://www.dwarfstd.org/ShowIssue.php?issue=141215.1 This allows a consumer to understand whether a composite data type is trivially copyable and thus should be passed by value instead of by reference. The canonical example is being able to distinguish the following two types: // S is not trivially copyable because of the explicit destructor. struct S { ~S() {} }; // T is a POD type. struct T { ~T() = default; }; This patch adds two new (DI)flags to LLVM metadata: TypePassByValue and TypePassByReference. <rdar://problem/36034922> Differential Revision: https://reviews.llvm.org/D41743 llvm-svn: 321844
* Revert r321838 -- It broke some of the builders.Lang Hames2018-01-058-831/+4
| | | | llvm-svn: 321842
* WholeProgramDevirt: Simplify ORE getter mechanism for old PM. NFCI.Peter Collingbourne2018-01-051-34/+17
| | | | llvm-svn: 321841
* remove unreferenced footnotesTim Hammerquist2018-01-051-1/+1
| | | | llvm-svn: 321840
* fix invalid footnote syntaxTim Hammerquist2018-01-051-3/+0
| | | | llvm-svn: 321839
* [ORC] Add new core ORC APIs (Core.h/Core.cpp): VSO, AsynchronousSymbolQuery andLang Hames2018-01-058-4/+831
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SymbolSource. These new APIs are a first stab at tackling some current shortcomings of ORC, especially in performance and threading support. VSO (Virtual Shared Object) is a symbol table representing the symbol definitions of a set of modules that behave as if they had been statically linked together into a shared object or dylib. Symbol definitions, either pre-defined addresses or lazy definitions, can be added and queries for symbol addresses made. The table applies the same linkage strength rules that static linkers do when constructing a dylib or shared object: duplicate definitions result in errors, strong definitions override weak or common ones. This class should improve symbol lookup speed by providing centralized symbol tables (as compared to the findSymbol implementation in the in-tree ORC layers, which maintain one symbol table per object file / module added). AsynchronousSymbolQuery is a query for the addresses of a set of symbols. Query results are returned via a callback once they become available. Querying for a set of symbols, rather than one symbol at a time (as the current lookup scheme does) the JIT has the opportunity to make better use of available resources (e.g. by spawning multiple jobs to materialize the requested symbols if possible). Returning results via a callback makes queries asynchronous, so queries from multiple threads of JIT'd code can proceed simultaneously. SymbolSource represents a source of symbol definitions. It is used when adding lazy symbol definitions to a VSO. Symbol definitions can be materialized when needed or discarded if a stronger definition is found. Materializing on demand via SymbolSources should (eventually) allow us to remove the lazy materializers from JITSymbol, which will in turn allow the removal of many current error checks and reduce the number of RPC round-trips involved in materializing remote symbols. Adding a discard function allows sources to discard symbol definitions (or mark them as available_externally), reducing the amount of redundant code generated by the JIT for ODR symbols. llvm-svn: 321838
* [ORC] Actually compare pointer values as advertised (rather than comparing refLang Hames2018-01-051-1/+1
| | | | | | counts). Oops. llvm-svn: 321837
* [ORC] Add dereference operator to SymbolStringPtr.Lang Hames2018-01-052-0/+8
| | | | | | Dereference yields a StringRef. llvm-svn: 321836
* [DEBUG] Fix debug info test for NVPTX, NFC.Alexey Bataev2018-01-041-8/+8
| | | | llvm-svn: 321835
* Make attribute instantiation instantiate all attributes, not just the first ofRichard Smith2018-01-047-52/+97
| | | | | | | | | | | | | | | | | | | | each kind. Attribute instantiation would previously default to instantiating each kind of attribute only once. This was overridden by a flag whose intended purpose was to permit attributes from a prior declaration to be inherited onto a new declaration even if that new declaration had its own copy of the attribute. This is the wrong behavior: when instantiating attributes from a template, we should always instantiate all the attributes that were written on that template. This patch renames the flag in the Attr class (and TableGen sources) to more clearly identify what it's actually for, and removes the usage of the flag from template instantiation. I also removed the flag from AlignedAttr, which was only added to work around the incorrect suppression of duplicate attribute instantiation. llvm-svn: 321834
* [IRExecutionUnit] Remove broken/dead code.Davide Italiano2018-01-041-26/+2
| | | | llvm-svn: 321833
* Revert "[JumpThreading] Preservation of DT and LVI across the pass"Reid Kleckner2018-01-0412-919/+99
| | | | | | | This reverts r321825, it causes crashes in Chromium. Reproducer forthcoming. llvm-svn: 321832
* Fix some comments and formatting in kmp_dispatch.cppJonathan Peyton2018-01-041-8/+9
| | | | llvm-svn: 321831
* Use POSIX argument syntax in test rewrite-includes-messages.cHubert Tong2018-01-041-1/+1
| | | | | | | Invoke diff such that options precede operands. Not doing so leads to unspecified behaviour under the LSB. llvm-svn: 321830
* [DEBUG] Fix the test for NVPTX, NFC.Alexey Bataev2018-01-041-10/+10
| | | | llvm-svn: 321829
* Use backslash escape, replacing xargs -0 in test macro-multiline.cHubert Tong2018-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: xargs supports escaping of newline characters with backslash. xargs -0 is neither part of POSIX nor the LSB. This patch removes the -0 option and adjusts the input to xargs accordingly; that is, the input is a text file not ending in an incomplete line, and the newline of interest is preceded by a backslash. Note: The treatment of escaped newline characters is not as clearly specified by POSIX as for escaped blank characters; however, the same can be said for escaped backslashes. It is slightly more clear for the case where the -I option is used; however, -I is also of limited portability. Reviewers: bruno Reviewed By: bruno Subscribers: bruno, rcraik, cfe-commits Differential Revision: https://reviews.llvm.org/D41544 llvm-svn: 321828
* Fix trademarks found by scannerJonathan Peyton2018-01-046-28/+28
| | | | llvm-svn: 321827
OpenPOWER on IntegriCloud