Paul C. Anagnostopoulos
4f5f29d409
Revert "[TableGen] Improve algorithm for inheriting class template args and fields"
...
This reverts commit c056f82434
.
That commit causes build failures.
2021-01-20 09:47:13 -05:00
Paul C. Anagnostopoulos
c056f82434
[TableGen] Improve algorithm for inheriting class template args and fields
...
Differential Revision: https://reviews.llvm.org/D94822
2021-01-20 09:31:43 -05:00
Paul C. Anagnostopoulos
a022be6253
[TableGen] Enhance !cast<string> to handle bit and bits types.
...
Add a test for this.
Differential Revision: https://reviews.llvm.org/D94529
2021-01-14 10:20:35 -05:00
Paul C. Anagnostopoulos
a675947712
[TableGen] Improve error message for semicolon after braced body.
...
Add a test for this message.
Differential Revision: https://reviews.llvm.org/D94412
2021-01-12 09:38:05 -05:00
Paul C. Anagnostopoulos
fe50b7363a
[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
d4f2fef746
[TableGen] Remove unused declaration that caused build failures.
2021-01-08 10:10:54 -05:00
Paul C. Anagnostopoulos
6e2b6351d2
[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
aa7968a87b
[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
1d0bc05551
[llvm] Use llvm::append_range (NFC)
2021-01-06 18:27:33 -08:00
Kazu Hirata
848e8f938f
[llvm] Construct SmallVector with iterator ranges (NFC)
2021-01-04 11:42:44 -08:00
Paul C. Anagnostopoulos
4820af99dd
[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
e122a71a0a
[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
554eb1f6dc
Revert "[TableGen] Add the !substr() bang operator"
...
This reverts commit 3a675c777d
.
2020-12-21 10:46:25 -05:00
Paul C. Anagnostopoulos
3a675c777d
[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
6c8ded0d8c
[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
6266f36226
[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
a2f922140f
[TableGen] Delete 11 unused declarations
2020-12-06 13:21:07 -08:00
Paul C. Anagnostopoulos
415fab6f67
[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
b23e84ffcf
[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
9671790b4f
[TableGen] Fix missing braces in if statement
2020-11-14 12:38:44 -05:00
Nico Weber
237dcfe2e6
Fix build after 54f9ee334
2020-11-14 10:23:22 -05:00
Paul C. Anagnostopoulos
54f9ee3341
[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
641428f928
[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
9218ff50f9
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
91d2e5c81a
[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
ae2cb4f427
[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
d56cd4291e
[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
473f8ae699
[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
9d72065cf6
[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
876af264c1
[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
dc5d6632b0
[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
4767bb2c0c
[TableGen] Add the !not and !xor operators.
...
Update the TableGen Programmer's Reference.
2020-10-15 10:12:59 -04:00
Paul C. Anagnostopoulos
350fafabe9
[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
0c1bb4f885
[TableGen] New backend to print detailed records.
...
Pertinent lints are fixed.
2020-10-02 10:22:13 -04:00
Paul C. Anagnostopoulos
c372809f5a
[TableGen] Improved messages in PseudoLoweringEmitter.
2020-09-28 10:18:22 -04:00
John Demme
76419525fb
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
b3931188fd
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
21f5f509c8
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
848d66fafd
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
bd55d5b2a1
Change comments about order of classes in superclass list.
2020-09-21 10:25:44 -04:00
Paul C. Anagnostopoulos
04cebd900f
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
8ce75e2778
TableGen: change a couple of member names to clarify their use.
2020-09-12 12:21:36 -04:00
Paul C. Anagnostopoulos
196e6f9f18
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
17cd34409a
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
88ce9f9b44
[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
3f0c9c1634
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
4bf1124eda
[TableGen] Make behavior of getValueAsListOfStrings consistent with getValueAsString
2020-06-12 19:16:48 +01:00
Fangrui Song
8ba36497dd
[TableGen] Simplify with TGParser::consume()
2020-04-26 15:26:49 -07:00
Fangrui Song
9caac56a65
[TableGen] Delete unused Record::resolveReferencesTo() after D44478. NFC
2020-04-26 01:21:41 -07:00
Fangrui Song
e69605bfb6
[TableGen] Add TGParser::consume()
2020-04-25 21:58:54 -07:00