summaryrefslogtreecommitdiff
path: root/utils
AgeCommit message (Collapse)Author
2018-11-02Bump version to 7.0.1Tom Stellard
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_70@346007 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-19Merging r343347:Tom Stellard
------------------------------------------------------------------------ r343347 | cmatthews | 2018-09-28 10:55:18 -0700 (Fri, 28 Sep 2018) | 4 lines make lit builtins a package cat.py is not being installed when lit is installed from source. So tests that use the internal shell fail when using cat. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_70@344792 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-04Merging r341244:Hans Wennborg
------------------------------------------------------------------------ r341244 | tstellar | 2018-08-31 22:15:31 +0200 (Fri, 31 Aug 2018) | 11 lines lit: Use sys.executable for executing builtin commands Summary: The python executable may not exist on all systems so use sys.executable instead. Reviewers: ddunbar, stella.stamenova Subscribers: delcypher, llvm-commits Differential Revision: https://reviews.llvm.org/D51511 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_70@341349 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-21Merging r339091:Hans Wennborg
------------------------------------------------------------------------ r339091 | stella.stamenova | 2018-08-07 06:08:46 +0200 (Tue, 07 Aug 2018) | 12 lines [lit, tests] Fix failing lit test: shtest-format.py Summary: The problem here is that on windows double quotes are used for paths (usually) while single quotes are not. This is not generally a problem for the tests because the lit infrastructure tends to treat both the same. One (and possibly only) exception is when some tests are run in an external shell such as some of the shtest-format tests. In this case on windows the path to python was not created correctly because it had single quotes and the test failed. This same test is already failing with python 3 which is why our testing missed the new failure. This patch will take care of the immediate failure with python 2 and I'll send a follow up for the python 3 failure. Reviewers: asmith, zturner Subscribers: delcypher, llvm-commits Differential Revision: https://reviews.llvm.org/D50373 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_70@340349 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-13Merging r339179 and r339184:Hans Wennborg
------------------------------------------------------------------------ r339179 | stella.stamenova | 2018-08-07 22:54:38 +0200 (Tue, 07 Aug 2018) | 12 lines [lit, python3] Update lit error logging to work correctly in python3 and other test fixes Summary: In Python2 'unicode' is a distinct type from 'str', but in Python3 'unicode' does not exist and instead all 'str' objects are Unicode string. This change updates the logic in the test logging for lit to correctly process each of the types, and more importantly, to not just fail in Python3. This change also reverses the use of quotes in several of the cfg files. By using '""' we are guaranteeing that the resulting path will work correctly on Windows while "''" only works correctly sometimes. This also fixes one of the failing tests. Reviewers: asmith, zturner Subscribers: stella.stamenova, delcypher, llvm-commits Differential Revision: https://reviews.llvm.org/D50397 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r339184 | stella.stamenova | 2018-08-07 23:21:30 +0200 (Tue, 07 Aug 2018) | 3 lines [lit] Disable shtest-timeout on Windows This test passes on Windows when using Python 3 but fails when using Python 2, so it needs more investigation before it can be enabled as the bots use Python 2. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_70@339542 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-13Merging r339073:Hans Wennborg
------------------------------------------------------------------------ r339073 | stella.stamenova | 2018-08-07 00:37:44 +0200 (Tue, 07 Aug 2018) | 14 lines [lit, python] Always add quotes around the python path in lit Summary: The issue with the python path is that the path to python on Windows can contain spaces. To make the tests always work, the path to python needs to be surrounded by quotes. This change updates several configuration files which specify the path to python as a substitution and also remove quotes from existing tests. Reviewers: asmith, zturner, alexshap, jakehehrlich Reviewed By: zturner, alexshap, jakehehrlich Subscribers: mehdi_amini, nemanjai, eraman, kbarton, jakehehrlich, steven_wu, dexonsmith, stella.stamenova, delcypher, llvm-commits Differential Revision: https://reviews.llvm.org/D50206 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_70@339541 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-02Merging r338682:Hans Wennborg
------------------------------------------------------------------------ r338682 | hans | 2018-08-02 10:10:34 +0200 (Thu, 02 Aug 2018) | 1 line utils/release/tag.sh: add debuginfo-tests to project list ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_70@338683 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-01Fix build bot after r338521Ulrich Weigand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338522 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-01[SystemZ, TableGen] Fix shift count handlingUlrich Weigand
The DAG combiner logic to simplify AND masks in shift counts is invalid. While it is true that the SystemZ shift instructions ignore all but the low 6 bits of the shift count, it is still invalid to simplify the AND masks while the DAG still uses the standard shift operators (which are *not* defined to match the SystemZ instruction behavior). Instead, this patch performs equivalent operations during instruction selection. For completely removing the AND, this now happens via additional DAG match patterns implemented by a multi-alternative PatFrags. For simplifying a 32-bit AND to a 16-bit AND, the existing DAG patterns were already mostly OK, they just needed an output XForm to actually truncate the immediate value. Unfortunately, the latter change also exposed a bug in TableGen: it seems XForms are currently only handled correctly for direct operands of the outermost operation node. This patch also fixes that bug by simply recurring through the whole pattern. This should be NFC for all other targets. Differential Revision: https://reviews.llvm.org/D50096 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338521 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-31Revert r338365: [X86] Improved sched models for X86 BT*rr instructions.Simon Pilgrim
https://reviews.llvm.org/D49243 Contains WIP code that should not have been included. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338369 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-31[X86] Improved sched models for X86 BT*rr instructions.Andrew V. Tischenko
https://reviews.llvm.org/D49243 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338365 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-28Add VS natvis support for LLVMDemangle's StringView.Zachary Turner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338202 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25[windows] Don't inline fieldFromInstruction on WindowsStella Stamenova
Summary: The VS compiler (on Windows) has a bug which results in fieldFromInstruction being optimized out in some circumstances. This only happens in *release no debug info* builds that have assertions *turned off* - in all other situations the function is not inlined, so the functionality is correct. All of the bots have assertions turned on, so this path is not regularly tested. The workaround is to not inline the function on Windows - if the bug is fixed in a later release of the VS compiler, the noinline specification can be removed. The test that consistently reproduces this is Lanai v11.txt test. Reviewers: asmith, labath, zturner Subscribers: dblaikie, stella.stamenova, aprantl, JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D49753 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337942 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24[docker] Fix LLVM_EXTERNAL_PROJECTS cmake variable valueAzharuddin Mohammed
Summary: LLVM_ENABLE_PROJECTS expects a semicolon separated project list. Fixes PR38158. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49712 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337842 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23[utils] Fix the llvm::Optional data formatterVedant Kumar
The llvm::Optional data formatter needs to look through the `Storage` container if it's present. Before: 220    if (Op && Op->getOp() != dwarf::DW_OP_LLVM_fragment) -> 221      HasComplexExpression = true;    222    223    // If the register can only be described by a complex expression (i.e.,    224    // multiple subregisters) it doesn't safely compose with another complex Target 0: (llc) stopped. (lldb) p Op (llvm::Optional<llvm::DIExpression::ExprOperand>) $0 = None After: (lldb) p Op (llvm::Optional<llvm::DIExpression::ExprOperand>) $0 = (llvm::DIExpression::ExprOperand) storage = { Op = 0x000000010603d460 } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337752 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23[gdb] Fix SmallVector pretty printer after r337514Fangrui Song
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337747 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23Re-land r335297 "[X86] Implement more of x86-64 large and medium PIC code ↵Reid Kleckner
models" Don't try to generate large PIC code for non-ELF targets. Neither COFF nor MachO have relocations for large position independent code, and users have been using "large PIC" code models to JIT 64-bit code for a while now. With this change, if they are generating ELF code, their JITed code will truly be PIC, but if they target MachO or COFF, it will contain 64-bit immediates that directly reference external symbols. For a JIT, that's perfectly fine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337740 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23[lit] Move the shtest-xunit-output check lines into shtest-formatJustin Bogner
These two tests are operating on the same test suite, which causes them to be racy about writing temporary files and can cause spurious failures. Merge them into one test to avoid the issue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337718 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-21Fix the MSVC Visualizers for SmallVector classes.Zachary Turner
Recent changes to the internal structure of SmallVector<> broke all of the MSVC visualizers. This fixes them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337644 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20[FileCheck] Provide an option for FileCheck to dump original input to stderr ↵George Karpenkov
on failure The option can be either set using environment variable (e.g. env FILECHECK_DUMP_INPUT_ON_FAILURE=1 ninja check-fuzzer) or with a FileCheck flag. This can be extremely useful for debugging, cf. https://groups.google.com/forum/#!topic/llvm-dev/kLrzg8OM_h8 for discussion. Differential Revision: https://reviews.llvm.org/D49328 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337609 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20[FileCheck] Fix search ranges for DAG-NOT-DAGJoel E. Denny
A DAG-NOT-DAG is a CHECK-DAG group, X, followed by a CHECK-NOT group, N, followed by a CHECK-DAG group, Y. Let y be the initial directive of Y. This patch makes the following changes to the behavior: 1. Directives in N can no longer match within part of Y's match range just because y happens not to be the earliest match from Y. Specifically, this patch withdraws N's search range end from y's match range start to Y's match range start. 2. y can no longer match within X's match range, where a y match produced a reordering complaint, which is thus no longer possible. Specifically, this patch withdraws y's search range start from X's permitted range start to X's match range end, which was already the search range start for other members of Y. Both of these changes can only increase the number of test passes: #1 constrains the ability of CHECK-NOTs to match, and #2 expands the ability of CHECK-DAGs to match without complaints. These changes are based on discussions at: <http://lists.llvm.org/pipermail/llvm-dev/2018-May/123550.html> <https://reviews.llvm.org/D47106> which conclude that: 1. These changes simplify the FileCheck conceptual model. First, it makes search ranges for DAG-NOT-DAG more consistent with other cases. Second, it was confusing that y was treated differently from the rest of Y. 2. These changes add theoretical use cases for DAG-NOT-DAG that had no obvious means to be expressed otherwise. We can justify the first half of this assertion with the observation that these changes can only increase the number of test passes. 3. Reordering detection for DAG-NOT-DAG had no obvious real benefit. We don't have evidence from real uses cases to help us debate conclusions #2 and #3, but #1 at least seems intuitive. Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D48986 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337605 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-18Add (very partial) Kate syntax highlighting definition for TableGenRoman Lebedev
This is very clearly not very good, and is very partial. But this is better than nothing at all, and shouldn't hurt those who don't need it. If there are others interested in this functionality, it will be great to further improve this. {F6253091} Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D47080 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337415 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-18[Tablegen][PredicateExpander] Add the ability to define checks for invalid ↵Andrea Di Biagio
registers. This was discussed in review D49436. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337378 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-17[Tablegen][PredicateExpander] Fix a bug in `expandCheckImmOperand`.Andrea Di Biagio
Function `expandCheckImmOperand` should always check if the input machine instruction is passed by reference before calling method `getOperand()` on it. Found while working on a patch that relies on `expandCheckImmOperand` to expand a scheduling predicate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337294 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-15[TableGen] std::move vectors into TreePatternNode.Craig Topper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337121 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-15[TableGen] Remove what seems to be an unnecessary std::map copy.Craig Topper
The comment says the copy was made so it could be destroyed in the following loop, but the original map wasn't used after the loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337120 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-15[TableGen] Add some std::move to the PatternToMatch constructor.Craig Topper
The are two vectors passed by value to the constructor. We should be able to move them into the object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337114 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13[TableGen] Suppress type validation when parsing pattern fragmentsUlrich Weigand
Currently, any attempt to define a PatFrag involving any floating-point only (or vector only) node causes a hard assertion failure in TableGen if the current target does not have any floating-point (or vector) types. This is annoying if you want to provide convenience fragments in common code (e.g. include/llvm/Target/TargetSelectionDAG.td) that is parsed on all platforms, including those that miss such types. But really, there's no reason not accept this when parsing the fragment -- of course it would be an error for such a target to actually *use* such a fragment anywhere, but as long as it doesn't, I think TableGen shouldn't error out. The immediate cause of the assertion failure is the test inside the ValidateOnExit destructor. This patch simply disables that check while infering types during parsing of pattern fragments (only). Reviewed By: hfinkel, kparzysz Differential Revision: https://reviews.llvm.org/D48887 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337023 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13[Tablegen] Optimize isSubsetOf() in AsmMatcherEmitter.cpp. NFCMarcello Maggioni
isSubsetOf() could be very slow if the hierarchy of the RegisterClasses of the target is very complicated. This is mainly caused by the fact that isSubset() is called multiple times over the same SuperClass of a register class if this ends up being the super class of a register class from multiple paths. Differential Revision: https://reviews.llvm.org/D49124 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337020 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13[cfi-verify] Support AArch64.Joel Galenson
This patch adds support for AArch64 to cfi-verify. This required three changes to cfi-verify. First, it generalizes checking if an instruction is a trap by adding a new isTrap flag to TableGen (and defining it for x86 and AArch64). Second, the code that ensures that the operand register is not clobbered between the CFI check and the indirect call needs to allow a single dereference (in x86 this happens as part of the jump instruction). Third, we needed to ensure that return instructions are not counted as indirect branches. Technically, returns are indirect branches and can be covered by CFI, but LLVM's forward-edge CFI does not protect them, and x86 does not consider them, so we keep that behavior. In addition, we had to improve AArch64's code to evaluate the branch target of a MCInst to handle calls where the destination is not the first operand (which it often is not). Differential Revision: https://reviews.llvm.org/D48836 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337007 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13[TableGen] Support multi-alternative pattern fragmentsUlrich Weigand
A TableGen instruction record usually contains a DAG pattern that will describe the SelectionDAG operation that can be implemented by this instruction. However, there will be cases where several different DAG patterns can all be implemented by the same instruction. The way to represent this today is to write additional patterns in the Pattern (or usually Pat) class that map those extra DAG patterns to the instruction. This usually also works fine. However, I've noticed cases where the current setup seems to require quite a bit of extra (and duplicated) text in the target .td files. For example, in the SystemZ back-end, there are quite a number of instructions that can implement an "add-with-overflow" operation. The same instructions also need to be used to implement just plain addition (simply ignoring the extra overflow output). The current solution requires creating extra Pat pattern for every instruction, duplicating the information about which particular add operands map best to which particular instruction. This patch enhances TableGen to support a new PatFrags class, which can be used to encapsulate multiple alternative patterns that may all match to the same instruction. It operates the same way as the existing PatFrag class, except that it accepts a list of DAG patterns to match instead of just a single one. As an example, we can now define a PatFrags to match either an "add-with-overflow" or a regular add operation: def z_sadd : PatFrags<(ops node:$src1, node:$src2), [(z_saddo node:$src1, node:$src2), (add node:$src1, node:$src2)]>; and then use this in the add instruction pattern: defm AR : BinaryRRAndK<"ar", 0x1A, 0xB9F8, z_sadd, GR32, GR32>; These SystemZ target changes are implemented here as well. Note that PatFrag is now defined as a subclass of PatFrags, which means that some users of internals of PatFrag need to be updated. (E.g. instead of using PatFrag.Fragment you now need to use !head(PatFrag.Fragments).) The implementation is based on the following main ideas: - InlinePatternFragments may now replace each original pattern with several result patterns, not just one. - parseInstructionPattern delays calling InlinePatternFragments and InferAllTypes. Instead, it extracts a single DAG match pattern from the main instruction pattern. - Processing of the DAG match pattern part of the main instruction pattern now shares most code with processing match patterns from the Pattern class. - Direct use of main instruction patterns in InferFromPattern and EmitResultInstructionAsOperand is removed; everything now operates solely on DAG match patterns. Reviewed by: hfinkel Differential Revision: https://reviews.llvm.org/D48545 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336999 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13[UpdateTestChecks] Teach the x86 asm parser to skip over the functionChandler Carruth
begin label emitted for some routines with personality functions and such. Without this, we don't even recognize such functions as appearing in the output and so don't attach any assertions to them. Happy to tweak this or improve it if folks w/ deeper knowledge of the asm sequences that show up here want. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336987 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13[FileCheck] Implement -v and -vv for tracing matchesJoel E. Denny
-v prints all directive pattern matches. -vv additionally prints info that might be noise to users but that can be helpful to FileCheck developers. To maximize code reuse and to make diagnostics more consistent, this patch also adjusts and extends some of the existing diagnostics. CHECK-NOT failures now report variables uses. Many more diagnostics now report the check prefix and kind of directive. Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D47114 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336967 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11[FileCheck] Don't permit overlapping CHECK-DAGJoel E. Denny
That is, make CHECK-DAG skip matches that overlap the matches of any preceding consecutive CHECK-DAG directives. This change makes CHECK-DAG more consistent with other directives, and there is evidence it makes CHECK-DAG more intuitive and less error-prone. See the RFC discussion starting at: http://lists.llvm.org/pipermail/llvm-dev/2018-May/123010.html Moreover, this behavior enables CHECK-DAG groups for unordered, non-unique strings or patterns. For example, it is useful for verifying output or logs from a parallel program, such as the OpenMP runtime. This patch also implements the command-line option -allow-deprecated-dag-overlap, which reverts CHECK-DAG to the old overlapping behavior. This option should not be used in new tests. It is meant only for the existing tests that are broken by this change and that need time to update. See the following bugzilla issue for tracking of such tests: https://bugs.llvm.org/show_bug.cgi?id=37532 Patches to add -allow-deprecated-dag-overlap to those tests will follow immediately. Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D47106 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336847 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11Revert r336830: [FileCheck] Don't permit overlapping CHECK-DAGJoel E. Denny
Companion patches are failing to commit, and this patch alone breaks many tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336833 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11[FileCheck] Don't permit overlapping CHECK-DAGJoel E. Denny
That is, make CHECK-DAG skip matches that overlap the matches of any preceding consecutive CHECK-DAG directives. This change makes CHECK-DAG more consistent with other directives, and there is evidence it makes CHECK-DAG more intuitive and less error-prone. See the RFC discussion starting at: http://lists.llvm.org/pipermail/llvm-dev/2018-May/123010.html Moreover, this behavior enables CHECK-DAG groups for unordered, non-unique strings or patterns. For example, it is useful for verifying output or logs from a parallel program, such as the OpenMP runtime. This patch also implements the command-line option -allow-deprecated-dag-overlap, which reverts CHECK-DAG to the old overlapping behavior. This option should not be used in new tests. It is meant only for the existing tests that are broken by this change and that need time to update. See the following bugzilla issue for tracking of such tests: https://bugs.llvm.org/show_bug.cgi?id=37532 Patches to add -allow-deprecated-dag-overlap to those tests will follow immediately. Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D47106 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336830 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11[TableGen] Add a general-purpose JSON backend.Simon Tatham
The aim of this backend is to output everything TableGen knows about the record set, similarly to the default -print-records backend. But where -print-records produces output in TableGen's input syntax (convenient for humans to read), this backend produces it as structured JSON data, which is convenient for loading into standard scripting languages such as Python, in order to extract information from the data set in an automated way. The output data contains a JSON representation of the variable definitions in output 'def' records, and a few pieces of metadata such as which of those definitions are tagged with the 'field' prefix and which defs are derived from which classes. It doesn't dump out absolutely every piece of knowledge it _could_ produce, such as type information and complicated arithmetic operator nodes in abstract superclasses; the main aim is to allow consumers of this JSON dump to essentially act as new backends, and backends don't generally need to depend on that kind of data. The new backend is implemented as an EmitJSON() function similar to all of llvm-tblgen's other EmitFoo functions, except that it lives in lib/TableGen instead of utils/TableGen on the basis that I'm expecting to add it to clang-tblgen too in a future patch. To test it, I've written a Python script that loads the JSON output and tests properties of it based on comments in the .td source - more or less like FileCheck, except that the CHECK: lines have Python expressions after them instead of textual pattern matches. Reviewers: nhaehnle Reviewed By: nhaehnle Subscribers: arichardson, labath, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D46054 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336771 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11[TableGen] Fix some bad formatting. NFCCraig Topper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336751 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-09[Utils] Fix gdb pretty printers to work with Python 3.Philip Pfaffe
Reiterate D23202 for container printers added after the change landed. Differential Revision: https://reviews.llvm.org/D46578 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336580 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-09[Power9] Add __float128 builtins for Round To OddStefan Pintilie
GCC has builtins for these round to odd instructions: __float128 __builtin_sqrtf128_round_to_odd (__float128) __float128 __builtin_{add,sub,mul,div}f128_round_to_odd (__float128, __float128) __float128 __builtin_fmaf128_round_to_odd (__float128, __float128, __float128) Differential Revision: https://reviews.llvm.org/D47550 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336578 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-05[TableGen] Increase the number of supported decoder fix-ups.Sander de Smalen
The vast number of added instructions for SVE causes TableGen to fail with an assertion: Assertion `Delta < 65536U && "disassembler decoding table too large!"' This patch increases the number of supported decoder fix-ups. Reviewers: dmgreen, stoklund, petpav01 Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D48937 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336334 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-03build_llvm_package.bat: Re-try the build stepsHans Wennborg
The build on Windows has been extra flaky recently; retrying helps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336192 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-02[X86] Add phony registers for high halves of regs with low halvesKrzysztof Parzyszek
Add registers still missing after r328016 (D43353): - for bits 15-8 of SI, DI, BP, SP (*H), and R8-R15 (*BH), - for bits 31-16 of R8-R15 (*WH). Thanks to Craig Topper for pointing it out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336134 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-29Make email options of find_interesting_reviews more flexible.Kristof Beyls
This enables a few requested improvements on the original review of this script at https://reviews.llvm.org/D46192. This introduces 2 new command line options: * --email-report: This option enables specifying who to email the generated report to. This also enables not sending any email and only printing out the report on stdout by not specifying this option on the command line. * --sender: this allows specifying the email address that will be used in the "From" email header. I believe that with these options the script starts having the basic features needed to run it well on a regular basis for a group of developers. Differential Revision: https://reviews.llvm.org/D47930 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335948 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-28Revert "Re-land r335297 "[X86] Implement more of x86-64 large and medium PIC ↵Jonas Devlieghere
code models"" Reverting because this is causing failures in the LLDB test suite on GreenDragon. LLVM ERROR: unsupported relocation with subtraction expression, symbol '__GLOBAL_OFFSET_TABLE_' can not be undefined in a subtraction expression git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335894 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-282 VS natvis improvements.Zachary Turner
Optional<T> was broken due to a change in the class's internals. That is fixed, and additionally a visualizer is added for Expected<T>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335892 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-26[FileCheck] Add CHECK-EMPTY directive for checking for blank linesJames Henderson
Prior to this change, there was no clean way of getting FileCheck to check that a line is completely empty. The expected way of using "CHECK: {{^$}}" does not work because the '^' matches the end of the previous match (this behaviour may be desirable in certain instances). For the same reason, "CHECK-NEXT: {{^$}}" will fail when the previous match was at the end of the line, as the pattern will match there. Using the recommended [[:space:]] to match an explicit new line could also match a space, and thus is not always desired. Literal '\n' matches also do not work. A workaround was suggested in the review, but it is a little clunky. This change adds a new directive that behaves the same as CHECK-NEXT, except that it only matches against empty lines (nothing, not even whitespace, is allowed). As with CHECK-NEXT, it will fail if more than one newline occurs before the next blank line. Example usage: ; test.txt foo bar ; CHECK: foo ; CHECK-EMPTY: ; CHECK-NEXT: bar Differential Revision: https://reviews.llvm.org/D28896 Reviewed by: probinson git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335613 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-26[NFC] Prefer (void) to LLVM_ATTRIBUTE_UNUSED for unused var in ↵Andrei Elovikov
GlobalISElemitter.cpp. Reviewers: dsanders, craig.topper Reviewed By: dsanders Subscribers: rovka, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D48534 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335581 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-26[gdb] Escape unprintable bytes in SmallString and StringRefFangrui Song
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335561 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-25[gdb] Add pretty printer for ExpectedFangrui Song
Reviewers: dblaikie Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48512 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335554 91177308-0d34-0410-b5e6-96231b3b80d8