1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
Commit Graph

7876 Commits

Author SHA1 Message Date
Nico Weber
6d6eb69a2b gn build: (manually) merge r373718
llvm-svn: 373726
2019-10-04 10:20:47 +00:00
James Molloy
5445e7fafa [TableGen] Introduce a generic automaton (DFA) backend
Summary:
This patch introduces -gen-automata, a backend for generating deterministic finite-state automata.

DFAs are already generated by the -gen-dfa-packetizer backend. This backend is more generic and will
hopefully be used to implement the DFA generation (and determinization) for the packetizer in the
future.

This backend allows not only generation of a DFA from an NFA (nondeterministic finite-state
automaton), it also emits sidetables that allow a path through the DFA under a sequence of inputs to
be analyzed, and the equivalent set of all possible NFA transitions extracted.

This allows a user to not just answer "can my problem be solved?" but also "what is the
solution?". Clearly this analysis is more expensive than just playing a DFA forwards so is
opt-in. The DFAPacketizer has this behaviour already but this is a more compact and generic
representation.

Examples are bundled in unittests/TableGen/Automata.td. Some are trivial, but the BinPacking example
is a stripped-down version of the original target problem I set out to solve, where we pack values
(actually immediates) into bins (an immediate pool in a VLIW bundle) subject to a set of esoteric
constraints.

Reviewers: t.p.northover

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67968

llvm-svn: 373718
2019-10-04 09:03:36 +00:00
GN Sync Bot
505419db65 gn build: Merge r373689
llvm-svn: 373690
2019-10-04 04:00:11 +00:00
Nico Weber
512f8447ab Reland r349624: Let TableGen write output only if it changed, instead of doing so in cmake
Move the write-if-changed logic behind a flag and don't pass it
with the MSVC generator. msbuild doesn't have a restat optimization,
so not doing write-if-change there doesn't have a cost, and it
should fix whatever causes PR43385.

llvm-svn: 373664
2019-10-03 21:22:28 +00:00
Nico Weber
ef76a6471b gn build: (manually) merge 373651 better
The reland uses a static library, not an object library.
Doesn't really matter for the gn build, but it's probalby
nice to have the same semantics for the target type.

llvm-svn: 373660
2019-10-03 20:41:57 +00:00
Nico Weber
ddba9942be Reland "gn build: (manually) merge r373551"
373551 relanded in 373651.

llvm-svn: 373654
2019-10-03 20:07:03 +00:00
Daniel Sanders
261abc0edd [gicombiner] Add a CodeExpander to handle C++ fragments with variable expansion
Summary:
This will handle expansion of C++ fragments in the declarative combiner
including custom predicates, and escapes into C++ to aid the migration
effort.

Fixed the -DLLVM_LINK_LLVM_DYLIB=ON using DISABLE_LLVM_LINK_LLVM_DYLIB when
creating the library. Apparently it automatically links to libLLVM.dylib
and we don't want that from tablegen.

Reviewers: bogner, volkan

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68288

> llvm-svn: 373551

llvm-svn: 373651
2019-10-03 19:13:39 +00:00
Nico Weber
80f09c72f7 gn build: (manually) merge r373622
llvm-svn: 373627
2019-10-03 16:59:12 +00:00
Sanjay Patel
b652f24f0d [UpdateTestChecks] add basic support for parsing msp430 asm
llvm-svn: 373605
2019-10-03 14:34:28 +00:00
GN Sync Bot
75ce572282 gn build: Merge r373601
llvm-svn: 373603
2019-10-03 14:28:27 +00:00
Djordje Todorovic
e7e0259a88 [llvm-locstats] Copy the script only when needed; NFC
llvm-svn: 373596
2019-10-03 13:18:14 +00:00
Nico Weber
4c24ab8e63 gn build: Revert 373554 "gn build: (manually) merge r373551"
r373551 was reverted in r373581.

llvm-svn: 373586
2019-10-03 11:57:39 +00:00
Kristina Brooks
c365a6e7b7 Revert 373551 (CodeExpander.cpp CMake issue)
Fix buildbots and revert the CodeExpander commit.

(See http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190930/699857.html )

llvm-svn: 373581
2019-10-03 11:04:48 +00:00
Kristina Brooks
9e8f7ddeff Revert 373555: libLLVM+modules failure with CMake 3.10.2
This reverts rL373555. I've sent an email out regarding the issue.

Commit on GitHub:
45f682f471

llvm-svn: 373579
2019-10-03 10:48:37 +00:00
GN Sync Bot
764866c8e4 gn build: Merge r373556
llvm-svn: 373558
2019-10-03 02:43:27 +00:00
Daniel Sanders
2137b4d07d [gicombiner] Make rL373551 compatible with older cmakes
Newer cmakes appear to be more flexible w.r.t object libraries. Convert to
a static library so that it works with older cmakes too

llvm-svn: 373555
2019-10-03 01:49:04 +00:00
Nico Weber
d02f2f3648 gn build: (manually) merge r373551
llvm-svn: 373554
2019-10-03 01:32:51 +00:00
Daniel Sanders
8ce0bf0469 [gicombiner] Add a CodeExpander to handle C++ fragments with variable expansion
Summary:
This will handle expansion of C++ fragments in the declarative combiner
including custom predicates, and escapes into C++ to aid the migration
effort.

Reviewers: bogner, volkan

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68288

llvm-svn: 373551
2019-10-03 01:04:42 +00:00
GN Sync Bot
09663cefc8 gn build: Merge r373538
llvm-svn: 373550
2019-10-03 00:47:13 +00:00
Daniel Sanders
fb64fe5ff8 [gicombiner] Fix a nullptr dereference when -combiners is given a name that isn't defined
This is unlikely to be the root cause for the windows bot failures but
it would explain the stack trace seen.

llvm-svn: 373543
2019-10-02 23:03:21 +00:00
Nico Weber
31042204e4 gn build: (manually) merge r373527
llvm-svn: 373534
2019-10-02 22:33:07 +00:00
Daniel Sanders
30b8668bfa [gicombiner] Add the boring boilerplate for the declarative combiner
Summary:
This is the first of a series of patches extracted from a much bigger WIP
patch. It merely establishes the tblgen pass and the way empty combiner
helpers are declared and integrated into a combiner info.

The tablegen pass takes a -combiners option to select the combiner helper
that will be generated. This can be given multiple values to generate
multiple combiner helpers at once. Doing so helps to minimize parsing
overhead.

The reason for creating a GlobalISel subdirectory in utils/TableGen is that
there will be quite a lot of non-pass files (~15) by the time the patch
series is done.

Reviewers: volkan

Subscribers: mgorny, hiraditya, simoncook, Petar.Avramovic, s.egerton, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68286

llvm-svn: 373527
2019-10-02 21:13:07 +00:00
Daniel Sanders
861fec3f67 Fix inconsistent indentation in TableGen.cpp
The anonymous namespace starts out (incorrectly) indented but isn't
indented from the TimeRegionsOpt declaration onwards.

llvm-svn: 373516
2019-10-02 19:56:04 +00:00
Evandro Menezes
06e7429b58 [TableGen] Improve error reporting of overlapping definitions (NFC)
llvm-svn: 373514
2019-10-02 19:44:53 +00:00
GN Sync Bot
d7dd220aed gn build: Merge r373489
llvm-svn: 373492
2019-10-02 17:23:41 +00:00
GN Sync Bot
9d9e9f7c90 gn build: Merge r373462
llvm-svn: 373463
2019-10-02 12:51:47 +00:00
Nico Weber
44c877a5b6 gn build: (manually) merge r373425
llvm-svn: 373438
2019-10-02 09:48:16 +00:00
Kerry McLaughlin
448a6d25cd [IntrinsicEmitter] Add overloaded type VecOfBitcastsToInt for SVE intrinsics
Summary:
This allows intrinsics such as the following to be defined:
 - declare <n x 4 x i32> @llvm.something.nxv4f32(<n x 4 x i32>, <n x 4 x i1>, <n x 4 x float>)

...where <n x 4 x i32> is derived from <n x 4 x float>, but
the element needs bitcasting to int.

Reviewers: c-rhodes, sdesmalen, rovka

Reviewed By: c-rhodes

Subscribers: tschuett, hiraditya, jdoerfert, llvm-commits, cfe-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68021

llvm-svn: 373437
2019-10-02 09:25:02 +00:00
Djordje Todorovic
20b221afa5 Reland "[utils] Implement the llvm-locstats tool"
The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.

Differential Revision: https://reviews.llvm.org/D66526

The cause of the test failure was resolved.

llvm-svn: 373427
2019-10-02 07:00:01 +00:00
Nico Weber
8670ee5ebb gn build: (manually) merge r373407
llvm-svn: 373419
2019-10-02 01:26:46 +00:00
GN Sync Bot
9227965a39 gn build: Merge r373392
llvm-svn: 373393
2019-10-01 21:23:33 +00:00
Simon Pilgrim
947cafdb7b Revert rL349624 : Let TableGen write output only if it changed, instead of doing so in cmake, attempt 2
Differential Revision: https://reviews.llvm.org/D55842
-----------------
As discussed on PR43385 this is causing Visual Studio msbuilds to perpetually rebuild all tablegen generated files

llvm-svn: 373338
2019-10-01 13:39:43 +00:00
Djordje Todorovic
3ef644a00f Revert "Reland "[utils] Implement the llvm-locstats tool""
This reverts commit rL373317 due to test failure on the
clang-s390x-linux build bot.

llvm-svn: 373336
2019-10-01 13:21:15 +00:00
Djordje Todorovic
cecb4ad7fc Reland "[utils] Implement the llvm-locstats tool"
The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.

Differential Revision: https://reviews.llvm.org/D66526

llvm-svn: 373317
2019-10-01 09:59:15 +00:00
Craig Topper
8b8482596d [X86] Consider isCodeGenOnly in the EVEX2VEX pass to make VMAXPD/PS map to the non-commutable VEX instruction. Use EVEX2VEX override to fix the scalar instructions.
Previously the match was ambiguous and VMAXPS/PD and VMAXCPS/PD
were mapped to the same VEX instruction. But we should keep
the commutableness when change the opcode.

llvm-svn: 373303
2019-10-01 07:10:09 +00:00
Thomas Preud'homme
6057227852 [FileCheck] Remove implementation types from API
Summary:
Remove use of FileCheckPatternContext and FileCheckString concrete types
from FileCheck API to allow moving it and the other implementation only
only declarations into a private header file.

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68186

llvm-svn: 373211
2019-09-30 14:12:03 +00:00
GN Sync Bot
6f608a6b9e gn build: Merge r373202
llvm-svn: 373204
2019-09-30 12:57:04 +00:00
Djordje Todorovic
daa23ce8ba Revert "Reland "[utils] Implement the llvm-locstats tool""
This reverts commit rL373183.

llvm-svn: 373200
2019-09-30 11:19:11 +00:00
Djordje Todorovic
faafb41cf2 Reland "[utils] Implement the llvm-locstats tool"
The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.

Differential Revision: https://reviews.llvm.org/D66526

llvm-svn: 373183
2019-09-30 07:35:17 +00:00
Nico Weber
953858a81d gn build: (manually) merge r373082
llvm-svn: 373086
2019-09-27 13:14:34 +00:00
GN Sync Bot
7ca190b53d gn build: Merge r373083
llvm-svn: 373085
2019-09-27 13:04:46 +00:00
Nico Weber
6a8ef0b7b3 Reland "gn build: (manually) merge r373028"
This relands r373029, reverted in 373033, because r373028 relanded in r373066.

llvm-svn: 373070
2019-09-27 11:37:59 +00:00
Simon Pilgrim
9314ff93e0 [UpdateTestChecks] Fix wildcard support on DOS prompts
D64572 / rL365818 changed the way that the file paths were collected, which meant we lost the file pattern expansion necessary when working with DOS command prompt

llvm-svn: 373062
2019-09-27 10:04:16 +00:00
Dmitri Gribenko
31df45cd54 Revert "gn build: (manually) merge r373028"
This reverts commit r373029, which depends on r373028, which I reverted.

llvm-svn: 373033
2019-09-26 23:30:47 +00:00
Nico Weber
46ae7724f1 gn build: (manually) merge r373028
llvm-svn: 373029
2019-09-26 23:17:25 +00:00
Bob Haarman
1e425c53e9 [NFC][emacs] remove out-of-date comment from tablegen-mode.el
Summary:
The syntax table was originally based on and attributed to
jasmin.el, but was rewritten in r45192, so the comment that
says the code comes from jasmin.el is no longer accurate. This
change removes the comment, shortening the code a bit.

Reviewers: MaskRay, lattner

Reviewed By: MaskRay

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68042

llvm-svn: 373008
2019-09-26 19:36:01 +00:00
Simon Pilgrim
2dfd238c4b DAGISelMatcherOpt - TGParser::ParseOperation - silence static analyzer cast_or_null<CheckTypeMatcher> null dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, replace with an null/isa assertion and cast<CheckTypeMatcher>.

llvm-svn: 373001
2019-09-26 17:38:47 +00:00
Hans Wennborg
c125ef45d6 build_llvm_package.bat: Bootstrap with VS 2019
llvm-svn: 372984
2019-09-26 14:57:55 +00:00
Bob Haarman
31aa3879e3 [emacs] simplify and improve keyword highlighting in tablegen-mode.el
Summary:
The keyword and type keyword matchers in tablegen-mode.el checked
for space, newline, tab, or open paren after the regular expression
that matches keywords (or type keywords, respectively). This is
unnecessary, because those regular expressions already include word
boundaries. This change removes the extra check. This also causes
"def" in "def:" to be highlighted as a keyword, which was missed
before.

Reviewers: lattner, MaskRay

Reviewed By: MaskRay

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68002

llvm-svn: 372904
2019-09-25 18:16:02 +00:00
Marco Antognini
0945fbe7ba [gn build] Fix Python DeprecationWarning
Summary:
This fixes two issues:
 - DeprecationWarning: invalid escape sequence \`
 - ResourceWarning: unclosed file

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67753

llvm-svn: 372876
2019-09-25 14:15:34 +00:00