Paul C. Anagnostopoulos
5e8a4a10a2
Revert "[TableGen] Improve algorithms for processing template arguments"
...
This reverts commit e589207d5aaee6cbf1d7c7de8867a17727d14aca.
2021-02-18 09:26:26 -05:00
Paul C. Anagnostopoulos
31c49eba49
[TableGen] Improve algorithms for processing template arguments
...
Rework template argument checking so that all arguments are type-checked
and cast if necessary.
Add a test.
Differential Revision: https://reviews.llvm.org/D96416
2021-02-18 09:15:26 -05:00
Kazu Hirata
ff49587cde
[llvm] Use llvm::is_contained (NFC)
2021-02-14 08:36:20 -08:00
J-Y You
c233f2a4f7
[TableGen] Fix anonymous record self-reference in foreach and multiclass
...
If we instantiate self-referenced anonymous records in foreach and
multiclass, the NAME value will point to incorrect record. It's because
anonymous name is resolved too early.
This patch adds AnonymousNameInit to represent an anonymous record name.
When instantiating an anonymous record, it will update the referred name.
Differential Revision: https://reviews.llvm.org/D95309
2021-02-01 10:59:07 -05:00
J-Y You
3d86bcfc2f
[TableGen] Fix instantiating multiclass in foreach
...
If multiclass argument comes from loop varaible and argument is record type,
it will not recognize the type. This patch ensures that loop variables are
resolved correctly.
Differential Revision: https://reviews.llvm.org/D95308
2021-01-29 10:25:33 -05:00
Paul C. Anagnostopoulos
8871b402ec
[TableGen] [DetailedRecords] Print record name that is null string as ""
...
Differential Revision: https://reviews.llvm.org/D95312
Add a test for the backend.
2021-01-27 10:41:46 -05:00
Kazu Hirata
0ec2908ce9
[llvm] Use pop_back_val (NFC)
2021-01-24 12:18:57 -08:00
Paul C. Anagnostopoulos
96e4bd87bc
Revert "[TableGen] Improve algorithm for inheriting class template args and fields"
...
This reverts commit c056f824340ff0189f3ef7870b83e3730de401d1.
That commit causes build failures.
2021-01-20 09:47:13 -05:00
Paul C. Anagnostopoulos
2ae5745b4b
[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
515dc94489
[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
e29674d7e7
[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
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