1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/utils/TableGen
Victor Campos 14293748bd [TableGen] Fix register class handling in TableGen's DAG ISel Matcher Generator
Summary:
In TableGen's instruction selection table generator, references to
register classes were handled by generating a matcher table entry in the
form of "EmitStringInteger, MVT::i32, 'RegisterClassID'". This ID is in
fact the enum integer value corresponding to the register class.

However, both the table generator and the table consumer
(SelectionDAGISel) assume that this ID is less than or equal to 127,
i.e. at most 7 bits. Values greater than this threshold cause completely
wrong behaviours in the instruction selection process.

This patch adds a check to determine if the enum integer value is
greater than the limit of 127. In finding so, the generator emits an
"EmitInteger" instead, which properly supports values with arbitrary
sizes.

Commit f8d044bbcfdc9e1ddc02247ffb86fe39e1f277f0 fixed the very same bug
for register subindices. The present patch now extends this cover to
register classes.

Reviewers: rampitec

Reviewed By: rampitec

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79705
2020-05-13 10:17:03 +01:00
..
GlobalISel [CMake] Fix building with -DBUILD_SHARED_LIBS=ON on mingw 2020-05-11 23:51:14 +03:00
AsmMatcherEmitter.cpp [MC] Move deprecation infos from MCTargetDesc to MCInstrInfo 2020-03-29 21:20:40 +02:00
AsmWriterEmitter.cpp [MCInstPrinter] Add parameter Address to printCustomAliasOperand. NFC 2020-03-27 00:38:20 -07:00
AsmWriterInst.cpp [MCInstPrinter] Pass Address parameter to MCOI::OPERAND_PCREL typed operands. NFC 2020-03-26 08:21:15 -07:00
AsmWriterInst.h [MCInstPrinter] Pass Address parameter to MCOI::OPERAND_PCREL typed operands. NFC 2020-03-26 08:21:15 -07:00
Attributes.cpp Sort EnumAttr so it matches Attribute::operator< 2020-04-26 17:00:25 +02:00
CallingConvEmitter.cpp
CMakeLists.txt [TableGen] Add backend to generate command guide for tools using libOption. 2019-11-22 14:10:17 -08:00
CodeEmitterGen.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CodeGenDAGPatterns.cpp [Alignment][NFC] Transitionning more getMachineMemOperand call sites 2020-03-31 08:36:18 +00:00
CodeGenDAGPatterns.h Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CodeGenHwModes.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CodeGenHwModes.h Explicitly include <cassert> when using assert 2020-03-02 22:45:28 +01:00
CodeGenInstruction.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CodeGenInstruction.h Explicitly include <cassert> when using assert 2020-03-02 22:45:28 +01:00
CodeGenIntrinsics.h [VP,Integer,#1] Vector-predicated integer intrinsics 2020-03-19 10:51:47 +01:00
CodeGenMapTable.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CodeGenRegisters.cpp [TableGen][GlobalISel] Rework RegisterBankEmitter for easier const correctness. 2020-03-18 19:52:23 +00:00
CodeGenRegisters.h [TableGen][GlobalISel] Rework RegisterBankEmitter for easier const correctness. 2020-03-18 19:52:23 +00:00
CodeGenSchedule.cpp Suppress a few -Wunreachable-code warnings. 2020-03-25 13:55:42 -04:00
CodeGenSchedule.h Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CodeGenTarget.cpp [VP,Integer,#1] Vector-predicated integer intrinsics 2020-03-19 10:51:47 +01:00
CodeGenTarget.h [NFC] Fix trivial typos in comments 2020-01-06 10:50:26 +00:00
CTagsEmitter.cpp
DAGISelEmitter.cpp
DAGISelMatcher.cpp
DAGISelMatcher.h
DAGISelMatcherEmitter.cpp llvm-tblgen -gen-dag-isel: Hoist SmallVector TmpBuf 2020-04-25 20:41:04 -07:00
DAGISelMatcherGen.cpp [TableGen] Fix register class handling in TableGen's DAG ISel Matcher Generator 2020-05-13 10:17:03 +01:00
DAGISelMatcherOpt.cpp
DFAEmitter.cpp Fix DfaEmitter::visitDfaState() crash in MSVC x86 debug builds (PR44945) 2020-02-25 15:18:41 +01:00
DFAEmitter.h DFAEmitter.h - remove unnecessary headers. NFC. 2020-05-08 14:53:10 +01:00
DFAPacketizerEmitter.cpp Move DFA tables into the read-only data segmant. 2020-02-18 14:36:56 +01:00
DisassemblerEmitter.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
ExegesisEmitter.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
FastISelEmitter.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
FixedLenDecoderEmitter.cpp [TableGen] Support combining AssemblerPredicates with ORs 2020-03-13 17:13:51 +00:00
GICombinerEmitter.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
GlobalISelEmitter.cpp TableGen/GlobalISel: Fix constraining REG_SEQUENCE operands 2020-04-14 22:05:22 -04:00
InfoByHwMode.cpp
InfoByHwMode.h
InstrDocsEmitter.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
InstrInfoEmitter.cpp [MC] Move deprecation infos from MCTargetDesc to MCInstrInfo 2020-03-29 21:20:40 +02:00
IntrinsicEmitter.cpp [VP,Integer,#1] Vector-predicated integer intrinsics 2020-03-19 10:51:47 +01:00
LLVMBuild.txt
OptEmitter.cpp [TableGen] Add backend to generate command guide for tools using libOption. 2019-11-22 14:10:17 -08:00
OptEmitter.h [TableGen] Add backend to generate command guide for tools using libOption. 2019-11-22 14:10:17 -08:00
OptParserEmitter.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
OptRSTEmitter.cpp Avoid including FileSystem.h from MemoryBuffer.h 2020-02-29 12:30:23 -08:00
PredicateExpander.cpp
PredicateExpander.h
PseudoLoweringEmitter.cpp
RegisterBankEmitter.cpp Revert "[TableGen][GlobalISel] Account for HwMode in RegisterBank register sizes" 2020-03-20 11:02:50 +01:00
RegisterInfoEmitter.cpp [TBLGEN] Emit register pressure set enum 2020-02-18 10:09:05 -08:00
RISCVCompressInstEmitter.cpp [RISCV] Support negative constants in CompressInstEmitter 2020-03-26 15:23:38 +00:00
SDNodeProperties.cpp
SDNodeProperties.h
SearchableTableEmitter.cpp [TableGen] Diagnose undefined fields when generating searchable tables 2020-02-19 14:03:48 +00:00
SequenceToOffsetTable.h [tablegen] Emit string literals instead of char arrays 2020-01-27 18:22:25 +00:00
SubtargetEmitter.cpp [MC] Widen the functional unit type from 32 to 64 bits. 2020-02-24 09:37:00 +01:00
SubtargetFeatureInfo.cpp [TableGen] Support combining AssemblerPredicates with ORs 2020-03-13 17:13:51 +00:00
SubtargetFeatureInfo.h
TableGen.cpp [tablegen] Emit string literals instead of char arrays 2020-01-27 18:22:25 +00:00
TableGenBackends.h [TableGen] Remove unused target intrinsic generation logic 2019-12-11 07:38:45 -08:00
tdtags
Types.cpp
Types.h
WebAssemblyDisassemblerEmitter.cpp
WebAssemblyDisassemblerEmitter.h
X86DisassemblerShared.h
X86DisassemblerTables.cpp [X86] Shrink lib/Target/X86/X86GenDisassemblerTables.inc 2020-04-25 19:44:32 -07:00
X86DisassemblerTables.h
X86EVEX2VEXTablesEmitter.cpp
X86FoldTablesEmitter.cpp X86FoldTablesEmitter - fix static analyzer potential invalid iterator warning. NFCI. 2019-11-06 13:31:00 +00:00
X86ModRMFilters.cpp
X86ModRMFilters.h
X86RecognizableInstr.cpp [X86] Add a new format type for instructions that represent named prefix bytes like data16 and rep. Use it to make a simpler version of isPrefix. 2020-02-21 12:34:59 -08:00
X86RecognizableInstr.h [X86] Add a new format type for instructions that represent named prefix bytes like data16 and rep. Use it to make a simpler version of isPrefix. 2020-02-21 12:34:59 -08:00