|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
45f3a5aa |
| 30-Jun-2022 |
Fangrui Song <[email protected]> |
[AArch64] Add target feature "all"
This is used by disassemblers: `llvm-mc -disassemble -mattr=` and `llvm-objdump --mattr=`. The main use case is for llvm-objdump to disassemble all known instructi
[AArch64] Add target feature "all"
This is used by disassemblers: `llvm-mc -disassemble -mattr=` and `llvm-objdump --mattr=`. The main use case is for llvm-objdump to disassemble all known instructions (D128030).
In user-facing tools, "all" is intentionally not supported in producers: integrated assembler (`.arch_extension all`), clang -march (`-march=armv9.3a+all`). Due to the code structure, `llvm-mc -mattr=+all` `llc -mattr=+all` are not rejected (they are internal tool). Add `llvm/test/CodeGen/AArch64/mattr-all.ll` to catch behavior changes.
AArch64SysReg::SysReg::haveFeatures: check `FeatureAll` to print `AArch64SysReg::SysReg::AltName` for some system registers (e.g. `ERRIDR_EL1, RNDR`).
AArch64.td: add `AssemblerPredicateWithAll` to additionally test `FeatureAll`. Change all `AssemblerPredicate` (except `UseNegativeImmediates`) to `AssemblerPredicateWithAll`.
utils/TableGen/{DecoderEmitter,SubtargetFeatureInfo}.cpp: support arbitrarily nested all_of, any_of, and not.
Note: A predicate supports all_of, any_of, and not. For a target (though currently not for AArch64) an encoding may be disassembled differently with different target features. Note: AArch64MCCodeEmitter::computeAvailableFeatures is not available to the disassembler.
Reviewed By: peter.smith, lenary
Differential Revision: https://reviews.llvm.org/D128029
show more ...
|
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
| #
9b0f227d |
| 22-Mar-2022 |
Craig Topper <[email protected]> |
[TableGen][RISCV] Add InstAliases with zero_reg to cover unmasked vnot.v, vncvt.x.x.w, vneg.v, etc.
The mask being NoRegister prevented the existing aliases from matching since NoRegister isn't in t
[TableGen][RISCV] Add InstAliases with zero_reg to cover unmasked vnot.v, vncvt.x.x.w, vneg.v, etc.
The mask being NoRegister prevented the existing aliases from matching since NoRegister isn't in the VMV0 register class.
To workaround this I've added new aliases that look for zero_reg. I had to motify tablegen to generate matching code for zero_reg. And as a consequence, I had to change the EmitPriority for an ARM alias that used zero_reg that started printing.
Reviewed By: frasercrmck
Differential Revision: https://reviews.llvm.org/D121496
show more ...
|
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3 |
|
| #
ed98c1b3 |
| 09-Mar-2022 |
serge-sans-paille <[email protected]> |
Cleanup includes: DebugInfo & CodeGen
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D121332
|
|
Revision tags: llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init |
|
| #
f15014ff |
| 26-Jan-2022 |
Benjamin Kramer <[email protected]> |
Revert "Rename llvm::array_lengthof into llvm::size to match std::size from C++17"
This reverts commit ef8206320769ad31422a803a0d6de6077fd231d2.
- It conflicts with the existing llvm::size in STLEx
Revert "Rename llvm::array_lengthof into llvm::size to match std::size from C++17"
This reverts commit ef8206320769ad31422a803a0d6de6077fd231d2.
- It conflicts with the existing llvm::size in STLExtras, which will now never be called. - Calling it without llvm:: breaks C++17 compat
show more ...
|
| #
ef820632 |
| 26-Jan-2022 |
serge-sans-paille <[email protected]> |
Rename llvm::array_lengthof into llvm::size to match std::size from C++17
As a conquence move llvm::array_lengthof from STLExtras.h to STLForwardCompat.h (which is included by STLExtras.h so no buil
Rename llvm::array_lengthof into llvm::size to match std::size from C++17
As a conquence move llvm::array_lengthof from STLExtras.h to STLForwardCompat.h (which is included by STLExtras.h so no build breakage expected).
show more ...
|
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
| #
dcd6162b |
| 10-Dec-2021 |
Duncan P. N. Exon Smith <[email protected]> |
utils: Remove some no-op raw_string_ostream flush calls, NFC
Since 65b13610a5226b84889b923bae884ba395ad084d, raw_string_ostream has been unbuffered by default. Based on an audit of llvm/utils/, this
utils: Remove some no-op raw_string_ostream flush calls, NFC
Since 65b13610a5226b84889b923bae884ba395ad084d, raw_string_ostream has been unbuffered by default. Based on an audit of llvm/utils/, this commit removes every call to `raw_string_ostream::flush()` and any call to `raw_string_ostream::str()` whose result is ignored or that doesn't help with clarity.
I left behind a few calls to `str()`. In these cases, the underlying std::string was declared pretty far away and never used again, whereas stream recently had its last write. The code is easier to read as-is; the no-op call to `flush()` inside `str()` isn't harmful, and when https://reviews.llvm.org/D115421 lands it'll be gone anyway.
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc1 |
|
| #
21abe212 |
| 14-Oct-2021 |
Rong Xu <[email protected]> |
[TableGen][PGO] Disable profile instrumentation for printInstruction function
We are seeing extremely long time in building AMDGPUInstPrinter.cpp when profile instrumentation is enabled: It takes mo
[TableGen][PGO] Disable profile instrumentation for printInstruction function
We are seeing extremely long time in building AMDGPUInstPrinter.cpp when profile instrumentation is enabled: It takes more than 5 minutes (compared to ~8 seconds in non-instrument build).
This caused by the huge statements in printInstruction functions. In profile instrumentation build, we need have extra control flow to differentiate each case statement. This in turn adds significant compile time in block placement and branch folding.
Function printInstruction is not likely to benefit from PGO build as it's rarely executed in a typical compilation. So here I disable the profile instrumentation for this function.
Differential Revision: https://reviews.llvm.org/D111682
show more ...
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1 |
|
| #
e6cf3d64 |
| 06-May-2021 |
Coelacanthus <[email protected]> |
[TableGen] Use range-based for loops (NFC)
Use range-based for loops in TableGen.
Reviewed By: Paul-C-Anagnostopoulos
Differential Revision: https://reviews.llvm.org/D101994
|
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init |
|
| #
5f843b2d |
| 23-Jan-2021 |
Kazu Hirata <[email protected]> |
[llvm] Use isAlpha/isAlnum (NFC)
|
|
Revision tags: llvmorg-11.1.0-rc2 |
|
| #
978c7540 |
| 20-Jan-2021 |
Kazu Hirata <[email protected]> |
[llvm] Use llvm::any_of (NFC)
|
|
Revision tags: llvmorg-11.1.0-rc1 |
|
| #
63a2bde2 |
| 26-Dec-2020 |
Kazu Hirata <[email protected]> |
[TableGen] Use llvm::erase_if (NFC)
|
|
Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
| #
415fab6f |
| 24-Nov-2020 |
Paul C. Anagnostopoulos <[email protected]> |
[TableGen] Eliminate the 'code' type
Update the documentation.
Rework various backends that relied on the code type.
Differential Revision: https://reviews.llvm.org/D92269
|
| #
b2f4c5fd |
| 17-Nov-2020 |
Florian Hahn <[email protected]> |
[AsmWriter] Factor out mnemonic generation to accessible getMnemonic.
This patch factors out the part of printInstruction that gets the mnemonic string for a given MCInst. This is intended to be use
[AsmWriter] Factor out mnemonic generation to accessible getMnemonic.
This patch factors out the part of printInstruction that gets the mnemonic string for a given MCInst. This is intended to be used subsequently for the instruction-mix remarks to display the final mnemonic (D90040).
Unfortunately making `getMnemonic` available to the AsmPrinter seems to require making it virtual. Not sure if there's a way around that with the current layering of the AsmPrinters.
Reviewed By: Paul-C-Anagnostopoulos
Differential Revision: https://reviews.llvm.org/D90039
show more ...
|
| #
d0b8810f |
| 06-Nov-2020 |
Jay Foad <[email protected]> |
[TableGen] Indentation and whitespace fixes in generated code. NFC.
Some of these were found by running clang-format over the generated code, although that complains about far more issues than I hav
[TableGen] Indentation and whitespace fixes in generated code. NFC.
Some of these were found by running clang-format over the generated code, although that complains about far more issues than I have fixed here.
Differential Revision: https://reviews.llvm.org/D90937
show more ...
|
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
| #
e533a176 |
| 28-May-2020 |
Cullen Rhodes <[email protected]> |
[TableGen] Fix non-standard escape warnings for braces in InstAlias
Summary: TableGen interprets braces ('{}') in the asm string of instruction aliases as variants but when defining aliases with lit
[TableGen] Fix non-standard escape warnings for braces in InstAlias
Summary: TableGen interprets braces ('{}') in the asm string of instruction aliases as variants but when defining aliases with literal braces they have to be escaped to prevent them being removed.
Braces are escaped with '\\', for example:
def FooBraces : InstAlias<"foo \\{$imm\\}", (foo IntOperand:$imm)>;
Although when TableGen is emitting the assembly writer (-gen-asm-writer) the AsmString that gets emitted is:
AsmString = "foo \{$\x01\}";
In c/c++ braces don't need to be escaped which causes compilation warnings:
warning: use of non-standard escape character '\{' [-Wpedantic]
This patch fixes the issue by unescaping the flattened alias asm string in the asm writer, by replacing '\{\}' with '{}'.
Reviewed By: hfinkel
Differential Revision: https://reviews.llvm.org/D79991
show more ...
|
|
Revision tags: llvmorg-10.0.1-rc1 |
|
| #
6728a9ae |
| 27-Mar-2020 |
Fangrui Song <[email protected]> |
[MCInstPrinter] Add parameter `Address` to printCustomAliasOperand. NFC
Follow-up of D72172 and llvmorg-11-init-6896-gb3cc5dcef0f.
|
| #
b3cc5dce |
| 27-Mar-2020 |
Fangrui Song <[email protected]> |
[MCInstPrinter] Add parameter `Address` to MCInstPrinter::printAliasInstr. NFC
Follow-up of D72172.
|
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5 |
|
| #
a26bd4ec |
| 13-Mar-2020 |
Simon Cook <[email protected]> |
[TableGen] Support combining AssemblerPredicates with ORs
For context, the proposed RISC-V bit manipulation extension has a subset of instructions which require one of two SubtargetFeatures to be en
[TableGen] Support combining AssemblerPredicates with ORs
For context, the proposed RISC-V bit manipulation extension has a subset of instructions which require one of two SubtargetFeatures to be enabled, 'zbb' or 'zbp', and there is no defined feature which both of these can imply to use as a constraint either (see comments in D65649).
AssemblerPredicates allow multiple SubtargetFeatures to be declared in the "AssemblerCondString" field, separated by commas, and this means that the two features must both be enabled. There is no equivalent to say that _either_ feature X or feature Y must be enabled, short of creating a dummy SubtargetFeature for this purpose and having features X and Y imply the new feature.
To solve the case where X or Y is needed without adding a new feature, and to better match a typical TableGen style, this replaces the existing "AssemblerCondString" with a dag "AssemblerCondDag" which represents the same information. Two operators are defined for use with AssemblerCondDag, "all_of", which matches the current behaviour, and "any_of", which adds the new proposed ORing features functionality.
This was originally proposed in the RFC at http://lists.llvm.org/pipermail/llvm-dev/2020-February/139138.html
Changes to all current backends are mechanical to support the replaced functionality, and are NFCI.
At this stage, it is illegal to combine features with ands and ors in a single AssemblerCondDag. I suspect this case is sufficiently rare that adding more complex changes to support it are unnecessary.
Differential Revision: https://reviews.llvm.org/D74338
show more ...
|
|
Revision tags: llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1 |
|
| #
adcd0268 |
| 28-Jan-2020 |
Benjamin Kramer <[email protected]> |
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly m
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies.
This doesn't actually modify StringRef yet, I'll do that in a follow-up.
show more ...
|
| #
482e890d |
| 15-Jan-2020 |
Luke Drummond <[email protected]> |
[tablegen] Emit string literals instead of char arrays
This changes the generated (Instr|Asm|Reg|Regclass)Name tables from this form: extern const char HexagonInstrNameData[] = { /* 0 */ '
[tablegen] Emit string literals instead of char arrays
This changes the generated (Instr|Asm|Reg|Regclass)Name tables from this form: extern const char HexagonInstrNameData[] = { /* 0 */ 'G', '_', 'F', 'L', 'O', 'G', '1', '0', 0, /* 9 */ 'E', 'N', 'D', 'L', 'O', 'O', 'P', '0', 0, /* 18 */ 'V', '6', '_', 'v', 'd', 'd', '0', 0, /* 26 */ 'P', 'S', '_', 'v', 'd', 'd', '0', 0, [...] };
...to this:
extern const char HexagonInstrNameData[] = { /* 0 */ "G_FLOG10\0" /* 9 */ "ENDLOOP0\0" /* 18 */ "V6_vdd0\0" /* 26 */ "PS_vdd0\0" [...] };
This should make debugging and exploration a lot easier for mortals, while providing a significant compile-time reduction for common compilers.
To avoid issues with low implementation limits, this is disabled by default for visual studio.
To force output one way or the other, pass `--long-string-literals=<bool>` to `tablegen`
Reviewers: mstorsjo, rnk
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D73044
A variation of this patch was originally committed in ce23515f5ab011 and then reverted in e464b31c due to build failures.
show more ...
|
| #
e464b31c |
| 23-Jan-2020 |
Sergej Jaskiewicz <[email protected]> |
Revert "[tablegen] Emit string literals instead of char arrays"
This reverts commit ce23515f5ab01161c98449d833b3ae013b553aa8.
That commit broke some builds on Windows: http://lab.llvm.org:8011/buil
Revert "[tablegen] Emit string literals instead of char arrays"
This reverts commit ce23515f5ab01161c98449d833b3ae013b553aa8.
That commit broke some builds on Windows: http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/13870
show more ...
|
| #
ce23515f |
| 15-Jan-2020 |
Luke Drummond <[email protected]> |
[tablegen] Emit string literals instead of char arrays
This changes the generated (Instr|Asm|Reg|Regclass)Name tables from this form: extern const char HexagonInstrNameData[] = { /* 0 */ '
[tablegen] Emit string literals instead of char arrays
This changes the generated (Instr|Asm|Reg|Regclass)Name tables from this form: extern const char HexagonInstrNameData[] = { /* 0 */ 'G', '_', 'F', 'L', 'O', 'G', '1', '0', 0, /* 9 */ 'E', 'N', 'D', 'L', 'O', 'O', 'P', '0', 0, /* 18 */ 'V', '6', '_', 'v', 'd', 'd', '0', 0, /* 26 */ 'P', 'S', '_', 'v', 'd', 'd', '0', 0, [...] };
...to this:
extern const char HexagonInstrNameData[] = { /* 0 */ "G_FLOG10\0" /* 9 */ "ENDLOOP0\0" /* 18 */ "V6_vdd0\0" /* 26 */ "PS_vdd0\0" [...] };
This should make debugging and exploration a lot easier for mortals, while providing a significant compile-time reduction for common compilers.
To avoid issues with low implementation limits, this is disabled by default for visual studio or when cross-compiling.
To force output one way or the other, pass `--long-string-literals=<bool>` to `tablegen`
Reviewers: mstorsjo, rnk
Subscribers: llvm-commit
Differential Revision: https://reviews.llvm.org/D73044
show more ...
|
|
Revision tags: llvmorg-11-init |
|
| #
3d87d0b9 |
| 03-Jan-2020 |
Fangrui Song <[email protected]> |
[MC] Add parameter `Address` to MCInstrPrinter::printInstruction
Follow-up of D72172.
Reviewed By: jhenderson, rnk
Differential Revision: https://reviews.llvm.org/D72180
|
|
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2 |
|
| #
1d9291cc |
| 23-Nov-2019 |
Reid Kleckner <[email protected]> |
[MC] Rewrite tablegen for printInstrAlias to comiple faster, NFC
Before this change, the *InstPrinter.cpp files of each target where some of the slowest objects to compile in all of LLVM. See this s
[MC] Rewrite tablegen for printInstrAlias to comiple faster, NFC
Before this change, the *InstPrinter.cpp files of each target where some of the slowest objects to compile in all of LLVM. See this snippet produced by ClangBuildAnalyzer: https://reviews.llvm.org/P8171$96 Search for "InstPrinter", and see that it shows up in a few places.
Tablegen was emitting a large switch containing a sequence of operand checks, each of which created many conditions and many BBs. Register allocation and jump threading both did not scale well with such a large repetitive sequence of basic blocks.
So, this change essentially turns those control flow structures into data. The previous structure looked like:
switch (Opc) { case TGT::ADD: // check alias 1 if (MI->getOperandCount() == N && // check num opnds MI->getOperand(0).isReg() && // check opnd 0 ... MI->getOperand(1).isImm() && // check opnd 1 AsmString = "foo"; break; } // check alias 2 if (...) ... return false;
The new structure looks like:
OpToPatterns: Sorted table of opcodes mapping to pattern indices. \-> Patterns: List of patterns. Previous table points to subrange of patterns to match. \-> Conds: The if conditions above encoded as a kind and 32-bit value.
See MCInstPrinter.cpp for the details of how the new data structures are interpreted.
Here are some before and after metrics. Time to compile AArch64InstPrinter.cpp: 0m29.062s vs. 0m2.203s size of the obj: 3.9M vs. 676K size of clang.exe: 97M vs. 96M
I have not benchmarked disassembly performance, but typically disassemblers are bottlenecked on IO and string processing, not alias matching, so I'm not sure it's interesting enough to be worth doing.
Reviewers: RKSimon, andreadb, xbolva00, craig.topper
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D70650
show more ...
|
|
Revision tags: llvmorg-9.0.1-rc1 |
|
| #
4b7cabf1 |
| 08-Oct-2019 |
Daniel Sanders <[email protected]> |
[tblgen] Add getOperatorAsDef() to Record
Summary: While working with DagInit's, it's often the case that you expect the operator to be a reference to a def. This patch adds a wrapper for this commo
[tblgen] Add getOperatorAsDef() to Record
Summary: While working with DagInit's, it's often the case that you expect the operator to be a reference to a def. This patch adds a wrapper for this common case to reduce the amount of boilerplate callers need to duplicate repeatedly.
getOperatorAsDef() returns the record if the DagInit has an operator that is a DefInit. Otherwise, it prints a fatal error.
There's only a few pre-existing examples in LLVM at the moment and I've left a few instances of the code this simplifies as they had more specific error messages than the generic one this produces. I'm going to be using this a fair bit in my subsequent patches.
Reviewers: bogner, volkan, nhaehnle
Reviewed By: nhaehnle
Subscribers: nhaehnle, hiraditya, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, lenary, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68424
llvm-svn: 374101
show more ...
|