1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
Commit Graph

471 Commits

Author SHA1 Message Date
Paul C. Anagnostopoulos
915b9b46d6 [TableGen] Fix use of *CurRec when CurRec is null.
I cannot build with the undefined sanitizer on Visual Studio.
2021-01-08 13:21:57 -05:00
Paul C. Anagnostopoulos
942aec297e [TableGen] Remove unused declaration that caused build failures. 2021-01-08 10:10:54 -05:00
Paul C. Anagnostopoulos
d74e81058e [TableGen] Add the assert statement, step 1
Differential Revision: https://reviews.llvm.org/D93911

This first step adds the assert statement and supports it at top level
and in record definitions. Later steps will support it in class
definitions and multiclasses.
2021-01-08 09:47:51 -05:00
Paul C. Anagnostopoulos
bae712927d [TableGen] Add field kind to the RecordVal class.
Differential Revision: https://reviews.llvm.org/D93969
2021-01-07 09:31:27 -05:00
Kazu Hirata
3109d596ee [llvm] Use llvm::append_range (NFC) 2021-01-06 18:27:33 -08:00
Kazu Hirata
08389fa62e [llvm] Construct SmallVector with iterator ranges (NFC) 2021-01-04 11:42:44 -08:00
Paul C. Anagnostopoulos
3c1ec6d0fb [TableGen] Fix bug in !interleave operator
I forgot to account for unresolved elements of the list.

Differential Revision: https://reviews.llvm.org/D93814
2020-12-28 12:17:24 -05:00
Paul C. Anagnostopoulos
1c400b3882 [TableGen] Add the !substr() bang operator
Update the documentation and add a test.

Build failed: Change SIZE_MAX to std::numeric_limits<int64_t>::max().

Differential Revision: https://reviews.llvm.org/D93419
2020-12-23 10:59:33 -05:00
Paul C. Anagnostopoulos
cb25df4369 Revert "[TableGen] Add the !substr() bang operator"
This reverts commit 3a675c777dd5788e2313cb06fb27b01f8a2e7573.
2020-12-21 10:46:25 -05:00
Paul C. Anagnostopoulos
415c2c940a [TableGen] Add the !substr() bang operator
Update the documentation and add a test.

Differential Revision: https://reviews.llvm.org/D93419
2020-12-21 09:41:59 -05:00
Simon Pilgrim
f264008f89 [TableGen] Don't dereference from dyn_cast<> - use cast<> instead. NFCI.
dyn_cast<> can return null if the cast fails, resulting in null dereferences and static analyzer warnings. We should use cast<> instead.
2020-12-14 12:12:08 +00:00
Paul C. Anagnostopoulos
02220af447 [TableGen] Cache the vectors of records returned by getAllDerivedDefinitions().
Differential Revision: https://reviews.llvm.org/D92674
2020-12-09 10:54:04 -05:00
Fangrui Song
4a079239ba [TableGen] Delete 11 unused declarations 2020-12-06 13:21:07 -08:00
Paul C. Anagnostopoulos
15379f2764 [TableGen] Eliminate the 'code' type
Update the documentation.

Rework various backends that relied on the code type.

Differential Revision: https://reviews.llvm.org/D92269
2020-12-03 10:19:11 -05:00
Paul C. Anagnostopoulos
58226c6585 [TableGen] Eliminte source location from CodeInit
Step 1 in eliminating the 'code' type.

Differential Revision: https://reviews.llvm.org/D91932
2020-11-23 11:30:13 -05:00
Paul C. Anagnostopoulos
151d493181 [TableGen] Fix missing braces in if statement 2020-11-14 12:38:44 -05:00
Nico Weber
02db4f902b Fix build after 54f9ee334 2020-11-14 10:23:22 -05:00
Paul C. Anagnostopoulos
17cd31c30e [TableGen] Add frontend/backend phase timing capability.
Describe in the BackEnd Developer's Guide. Instrument a few backends.

Remove an old unused timing facility. Add a null backend for timing
the parser.

Differential Revision: https://reviews.llvm.org/D91388
2020-11-14 10:10:29 -05:00
Paul C. Anagnostopoulos
82f80b36cd [TableGen] Enhance the six comparison bang operators.
Update the Programmer's Reference.

Differential Revision: https://reviews.llvm.org/D91036
2020-11-13 09:57:27 -05:00
serge-sans-paille
82b6e6053d llvmbuildectomy - replace llvm-build by plain cmake
No longer rely on an external tool to build the llvm component layout.

Instead, leverage the existing `add_llvm_componentlibrary` cmake function and
introduce `add_llvm_component_group` to accurately describe component behavior.

These function store extra properties in the created targets. These properties
are processed once all components are defined to resolve library dependencies
and produce the header expected by llvm-config.

Differential Revision: https://reviews.llvm.org/D90848
2020-11-13 10:35:24 +01:00
Paul C. Anagnostopoulos
25ecf898fc [TableGen] Add the !filter bang operator.
Add a test. Update the Programmer's Reference.

Use it in some TableGen files.

Differential Revision: https://reviews.llvm.org/D91008
2020-11-09 10:56:55 -05:00
Paul C. Anagnostopoulos
0830936d52 [TableGen] Add true and false literals to represent booleans
Update the Programmer's Reference document.

Add a test. Update a couple of tests with an improved error message.

Differential Revision: https://reviews.llvm.org/D90635
2020-11-05 09:07:21 -05:00
Paul C. Anagnostopoulos
9295b21984 [TableGen] Add !interleave operator to concatenate a list of values with delimiters
Add a test. Use it in some TableGen files.

Differential Revision: https://reviews.llvm.org/D90469
2020-11-04 09:23:54 -05:00
Paul C. Anagnostopoulos
e028635778 [TableGen] Fix a couple of minor issues regarding the paste operator.
Update the documentation to fully describe it.

Differential Revision: https://reviews.llvm.org/D90617
2020-11-02 12:21:54 -05:00
Paul C. Anagnostopoulos
961a515ed0 [TableGen] [AMDGPU] Add !sub operator for subtraction
Use it in the AMDGPU target to eliminate !add(value1, !mul(value2, -1))

Differential Revision: https://reviews.llvm.org/D90107
2020-10-28 12:27:53 -04:00
Paul C. Anagnostopoulos
a16b7dbf16 [TableGen] Change !getop and !setop to !getdagop and !setdagop.
Differential Revision: https://reviews.llvm.org/D89814
2020-10-23 10:36:05 -04:00
Paul C. Anagnostopoulos
40d033740a [TableGen] Enhance !empty and !size to handle strings and DAGs.
Fix bug in the type checking for !empty, !head, !size, !tail.
2020-10-19 09:22:20 -04:00
Paul C. Anagnostopoulos
15f7b61423 [TableGen] Add the !not and !xor operators.
Update the TableGen Programmer's Reference.
2020-10-15 10:12:59 -04:00
Paul C. Anagnostopoulos
69c806cfe8 [TableGen] Add overload of RecordKeeper::getAllDerivedDefinitions()
and use in PseudoLowering backend.
Now the two getAllDerivedDefinitions() use StringRef and Arrayref.
Use all_of() in getAllDerivedDefinitions().
2020-10-12 16:40:09 -04:00
Paul C. Anagnostopoulos
6ec902749c [TableGen] New backend to print detailed records.
Pertinent lints are fixed.
2020-10-02 10:22:13 -04:00
Paul C. Anagnostopoulos
90d4bf8784 [TableGen] Improved messages in PseudoLoweringEmitter. 2020-09-28 10:18:22 -04:00
John Demme
789af735fa Common code preparation for tblgen-types patch
Cleanup and add methods which https://reviews.llvm.org/D86904 requires. Breaking up to lower review load.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D88267
2020-09-26 02:47:48 +00:00
Paul C. Anagnostopoulos
a0352b58a7 Enhance TableGen so that backends can produce better error messages.
Modify SearchableTableEmitter.cpp to take advantage.
Clean up formatting and capitalization issues.
2020-09-23 13:35:32 -04:00
Paul C. Anagnostopoulos
54f163f8a4 Two patches to fix the broken build.
One to fix a C++ compiler warning.
One to allow Sphinx to find a new document.
2020-09-22 16:00:31 -04:00
Paul C. Anagnostopoulos
82dfae475d Version 0.5 of the new "TableGen Backend Developer's Guide."
Files modified to take comments into account.
MLIR documentation updated for new TableGen documentation files.
2020-09-22 14:01:52 -04:00
Paul C. Anagnostopoulos
0f7c7ec819 Change comments about order of classes in superclass list. 2020-09-21 10:25:44 -04:00
Paul C. Anagnostopoulos
58f51bc97c Change name of Record::TheInit to CorrespondingDefInit to make code clearer.
Differential Revision: https://reviews.llvm.org/D87919
2020-09-19 09:18:44 -04:00
Paul C. Anagnostopoulos
780978660e TableGen: change a couple of member names to clarify their use. 2020-09-12 12:21:36 -04:00
Paul C. Anagnostopoulos
0f17e8fd6b Replace TableGen range piece punctuator with '...'
The TableGen range piece punctuator is currently '-' (e.g., {0-9}),
which interacts oddly with the fact that an integer literal's sign
is part of the literal. This patch replaces the '-' with the new
punctuator '...'. The '-' punctuator is deprecated.

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

Change-Id: I3d53d14e23f878b142d8f84590dd465a0fb6c09c
2020-08-21 23:33:57 +02:00
Nicolai Hähnle
501b7513e1 Fix two bugs in TGParser::ParseValue
TGParser::ParseValue contains two recursive calls, one to parse the RHS of a list paste operator and one to parse the RHS of a paste operator in a class/def name. Both of these calls neglect to check the return value to see if it is null (because of some error). This causes a crash in the next line of code, which uses the return value. The code now checks for null returns.

Differential Revision: https://reviews.llvm.org/D85852
2020-08-21 23:19:36 +02:00
Jon Roelofs
f305e07c2d [TableGen][CGS] Print better errors on overlapping InstRW
Differential Revision: https://reviews.llvm.org/D83588
2020-07-27 09:41:10 -06:00
Stanislav Mekhanoshin
1a6d6ebda9 Fix ubsan error in tblgen with signed left shift
UBSAN complains when tblgen performs SHL of a negative
value.

Differential Revision: https://reviews.llvm.org/D81952
2020-06-16 11:15:09 -07:00
Daniel Grumberg
4e65793a85 [TableGen] Make behavior of getValueAsListOfStrings consistent with getValueAsString 2020-06-12 19:16:48 +01:00
Fangrui Song
1cb8a0e346 [TableGen] Simplify with TGParser::consume() 2020-04-26 15:26:49 -07:00
Fangrui Song
b8f75260a2 [TableGen] Delete unused Record::resolveReferencesTo() after D44478. NFC 2020-04-26 01:21:41 -07:00
Fangrui Song
3abf162d09 [TableGen] Add TGParser::consume() 2020-04-25 21:58:54 -07:00
Fangrui Song
33d6800058 [TableGen] Drop deprecated leading # when parsing a SimpleValue 2020-04-25 16:27:40 -07:00
Alex Brachet
41beade9f4 [TableGen] [NFC] Make argv0 const
`argv0` was never being modified. No changes made except to the type.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D78840
2020-04-25 16:42:38 -04:00
Simon Pilgrim
f7ad752f8a TGLexer.h - add missing <vector> include.
Looks like we are implicitly depending on <vector> but not all machines will include it.
2020-04-21 11:57:10 +01:00
Simon Pilgrim
fdae127fbd TGParser.h - cleanup includes and forward declarations. NFC.
Replace Twine.h/SourceMgr.h includes with forward declarations and include in TGParser.cpp
Remove forward declarations we already have to include in Record.h
2020-04-21 11:32:58 +01:00