llvm-project/llvm/utils/TableGen
Craig Topper 7f6441f96e [TableGen][RISCV] Relax a restriction in generating patterns for commutable SDNodes.
Previously, all children would be checked to see if any were an
explicit Register. If anywhere no commutable patterns would be
generated. This patch loosens the restriction to only check the
children that are being commuted.

Digging back through history, this code predates the existence of
commutable intrinsics and commutable SDNodes with more than 2
operands. At that time the loop would count the number of children that
weren't registers and if that was equal to 2 it would allow commuting.
I don't think this loop was re-considered when commutable
intrinsics were added or when we allowed SDNodes with more than 2
operands.

This important for RISCV were our isel patterns have a V0 mask
operand after the commutable operands on some RISCVISD opcodes.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D117955
2022-02-01 21:07:03 -08:00
..
GlobalISel Cleanup includes for LLVMTableGenGlobalISel 2022-01-28 11:50:50 +01:00
AsmMatcherEmitter.cpp [ARM][AsmParser] Don't emit "deprecated instruction in IT block" warning if requested 2021-11-03 17:18:04 +08:00
AsmWriterEmitter.cpp Revert "Rename llvm::array_lengthof into llvm::size to match std::size from C++17" 2022-01-26 16:55:53 +01:00
AsmWriterInst.cpp Use std::string::substr (NFC) 2021-11-22 08:21:09 -08:00
AsmWriterInst.h [TableGen] Fix printing second PC-relative operand 2021-06-23 13:27:37 +07:00
Attributes.cpp [Attributes] Determine attribute properties from TableGen data 2021-07-12 22:13:38 +02:00
CMakeLists.txt [llvm-tblgen][RISCV] Make llvm-tblgen RISCVCompressInstEmitter to be common infra across different targets 2021-11-18 11:14:27 +08:00
CTagsEmitter.cpp
CallingConvEmitter.cpp
CodeBeadsGen.cpp
CodeEmitterGen.cpp utils: Remove some no-op raw_string_ostream flush calls, NFC 2021-12-10 11:26:08 -08:00
CodeGenDAGPatterns.cpp [TableGen][RISCV] Relax a restriction in generating patterns for commutable SDNodes. 2022-02-01 21:07:03 -08:00
CodeGenDAGPatterns.h [TableGen] Fix both sides of '&&' are same 2021-10-12 09:19:20 -07:00
CodeGenHwModes.cpp
CodeGenHwModes.h
CodeGenInstruction.cpp [llvm] Use true/false instead of 1/0 (NFC) 2022-01-07 00:39:14 -08:00
CodeGenInstruction.h [llvm] Remove uses of `std::vector<bool>` 2022-01-18 18:20:45 +01:00
CodeGenIntrinsics.h [llvm] Remove unused forward declarations (NFC) 2022-01-07 20:00:34 -08:00
CodeGenMapTable.cpp [TableGen] Fix codgen of InstrMapping with multiple columns and values 2021-10-25 21:00:49 -07:00
CodeGenRegisters.cpp [TableGen] Allow targets to entirely ignore Psets for registers 2021-09-23 23:07:35 -04:00
CodeGenRegisters.h [TableGen] Allow target specific flags for RegisterClass 2021-08-31 22:29:11 -04:00
CodeGenSchedule.cpp [TableGen] Fix reporting from CodeGenSchedModels::checkCompleteness(). 2022-02-01 11:32:38 -06:00
CodeGenSchedule.h [llvm] Remove unused forward declarations (NFC) 2022-01-07 20:00:34 -08:00
CodeGenTarget.cpp Revert "Rename llvm::array_lengthof into llvm::size to match std::size from C++17" 2022-01-26 16:55:53 +01:00
CodeGenTarget.h [TableGen][SelectionDAG] Use ComplexPattern type for non-leaf nodes 2021-12-03 07:04:59 +00:00
CompressInstEmitter.cpp Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
DAGISelEmitter.cpp [TableGen] Use range-based for loop. NFC 2021-04-18 12:41:09 -07:00
DAGISelMatcher.cpp
DAGISelMatcher.h
DAGISelMatcherEmitter.cpp utils: Remove some no-op raw_string_ostream flush calls, NFC 2021-12-10 11:26:08 -08:00
DAGISelMatcherGen.cpp utils: Remove some no-op raw_string_ostream flush calls, NFC 2021-12-10 11:26:08 -08:00
DAGISelMatcherOpt.cpp [llvm] Use true/false instead of 1/0 (NFC) 2022-01-07 00:39:14 -08:00
DFAEmitter.cpp [NFCI] Move DEBUG_TYPE definition below #includes 2021-05-30 17:31:01 +08:00
DFAEmitter.h
DFAPacketizerEmitter.cpp [NFCI] Move DEBUG_TYPE definition below #includes 2021-05-30 17:31:01 +08:00
DirectiveEmitter.cpp
DisassemblerEmitter.cpp
ExegesisEmitter.cpp [TableGen] Remove redundant `Error:` in msg (NFC) 2021-05-10 21:18:37 +08:00
FastISelEmitter.cpp utils: Remove some no-op raw_string_ostream flush calls, NFC 2021-12-10 11:26:08 -08:00
FixedLenDecoderEmitter.cpp [TableGen] Use range-based for loops (NFC) 2021-05-07 13:34:03 +08:00
GICombinerEmitter.cpp Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
GlobalISelEmitter.cpp Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
InfoByHwMode.cpp Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
InfoByHwMode.h Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
InstrDocsEmitter.cpp
InstrInfoEmitter.cpp [llvm] Fix bugprone argument comments (NFC) 2022-01-08 11:56:38 -08:00
IntrinsicEmitter.cpp Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
OptEmitter.cpp
OptEmitter.h
OptParserEmitter.cpp Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
OptRSTEmitter.cpp Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
PredicateExpander.cpp utils: Remove some no-op raw_string_ostream flush calls, NFC 2021-12-10 11:26:08 -08:00
PredicateExpander.h Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
PseudoLoweringEmitter.cpp
RegisterBankEmitter.cpp Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
RegisterInfoEmitter.cpp Revert "Rename llvm::array_lengthof into llvm::size to match std::size from C++17" 2022-01-26 16:55:53 +01:00
SDNodeProperties.cpp [NFC][SDNode] Use `StringSwitch` instead of `if` 2022-01-18 08:12:26 +08:00
SDNodeProperties.h
SearchableTableEmitter.cpp Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
SequenceToOffsetTable.h
SubtargetEmitter.cpp [llvm] Strip redundant lambda (NFC) 2021-12-17 10:51:40 -08:00
SubtargetFeatureInfo.cpp
SubtargetFeatureInfo.h
TableGen.cpp [tblgen] Disable lsan weak hook when building with msvc 2022-01-28 10:02:52 +00:00
TableGenBackends.h
Types.cpp
Types.h
WebAssemblyDisassemblerEmitter.cpp Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
WebAssemblyDisassemblerEmitter.h Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
X86DisassemblerShared.h
X86DisassemblerTables.cpp Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
X86DisassemblerTables.h Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
X86EVEX2VEXTablesEmitter.cpp [TableGen] X86EVEX2VEXTablesEmitter - Use const-ref iterator in for-range loop. NFCI. 2021-09-17 14:04:53 +01:00
X86FoldTablesEmitter.cpp Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
X86ModRMFilters.cpp
X86ModRMFilters.h [llvm] Remove redundant member initialization (NFC) 2022-01-08 11:56:44 -08:00
X86RecognizableInstr.cpp Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
X86RecognizableInstr.h Cleanup llvm/utils/TableGen headers 2022-01-31 11:16:28 +01:00
tdtags