1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/utils/TableGen
Craig Topper 5c5e25358e [TableGen][SelectionDAG] Improve efficiency of encoding negative immediates for isel's CheckInteger opcode.
CheckInteger uses an int64_t encoded using a variable width encoding
that is optimized for encoding a number with a lot of leading zeros.
Negative numbers have no leading zeros so use the largest encoding
requiring 9 bytes.

I believe its most like we want to check for positive and negative
numbers near 0. -1 is quite common due to its use in the 'not'
idiom.

To optimize for this, we can borrow an idea from the bitcode format
and move the sign bit to bit 0 with the magnitude stored in the
upper bits. This will drastically increase the number of leading
zeros for small magnitudes. Then we can run this value through
VBR encoding.

This gives a small reduction in the table size on all in tree
targets except VE where size increased by about 300 bytes due
to intrinsic ids now requiring 3 bytes instead of 2. Since the
intrinsic enum space is shared by all targets this an unfortunate
consquence of where VE is currently located in the range.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D96317
2021-02-18 08:53:17 -08:00
..
GlobalISel Renovate CMake files in the llvm-exegesis tool. 2021-02-10 14:22:55 -05:00
AsmMatcherEmitter.cpp [TableGen] Use ListSeparator (NFC) 2021-02-13 20:41:36 -08:00
AsmWriterEmitter.cpp [llvm] Use isAlpha/isAlnum (NFC) 2021-01-22 23:25:03 -08:00
AsmWriterInst.cpp [llvm] Use isAlpha/isAlnum (NFC) 2021-01-22 23:25:03 -08:00
AsmWriterInst.h
Attributes.cpp
CallingConvEmitter.cpp
CMakeLists.txt
CodeEmitterGen.cpp [TableGen] Make the map in InfoByHwMode protected. NFCI 2021-02-11 21:16:10 -08:00
CodeGenDAGPatterns.cpp [TableGen] Use ListSeparator (NFC) 2021-02-11 23:31:27 -08:00
CodeGenDAGPatterns.h [TableGen] Make all the fields in PatternToMatch private. NFCI 2021-02-06 22:34:01 -08:00
CodeGenHwModes.cpp
CodeGenHwModes.h
CodeGenInstruction.cpp [llvm] Remove redundant string initialization (NFC) 2021-01-12 21:43:46 -08:00
CodeGenInstruction.h
CodeGenIntrinsics.h
CodeGenMapTable.cpp [llvm] Remove redundant string initialization (NFC) 2021-01-12 21:43:46 -08:00
CodeGenRegisters.cpp [TableGen] Make the map in InfoByHwMode protected. NFCI 2021-02-11 21:16:10 -08:00
CodeGenRegisters.h [TableGen] Use range-based for loops (NFC) 2021-02-01 20:55:09 -08:00
CodeGenSchedule.cpp [TableGen] Use ListSeparator (NFC) 2021-02-10 20:01:20 -08:00
CodeGenSchedule.h
CodeGenTarget.cpp [TableGen] Drop redundant const from return types (NFC) 2021-01-17 10:39:49 -08:00
CodeGenTarget.h [TableGen] Drop redundant const from return types (NFC) 2021-01-17 10:39:49 -08:00
CTagsEmitter.cpp
DAGISelEmitter.cpp [TableGen] Make all the fields in PatternToMatch private. NFCI 2021-02-06 22:34:01 -08:00
DAGISelMatcher.cpp [TableGen] Add isContradictoryImpl implementation to CheckCondCodeMatcher and CheckChild2CondCodeMatcher. 2021-01-26 19:44:57 -08:00
DAGISelMatcher.h [TableGen] Add isContradictoryImpl implementation to CheckCondCodeMatcher and CheckChild2CondCodeMatcher. 2021-01-26 19:44:57 -08:00
DAGISelMatcherEmitter.cpp [TableGen][SelectionDAG] Improve efficiency of encoding negative immediates for isel's CheckInteger opcode. 2021-02-18 08:53:17 -08:00
DAGISelMatcherGen.cpp [TableGen] Make all the fields in PatternToMatch private. NFCI 2021-02-06 22:34:01 -08:00
DAGISelMatcherOpt.cpp
DFAEmitter.cpp
DFAEmitter.h
DFAPacketizerEmitter.cpp
DirectiveEmitter.cpp [flang][directive] Enforce basic semantic check for all clauses 2021-02-01 13:33:30 -05:00
DisassemblerEmitter.cpp
ExegesisEmitter.cpp
FastISelEmitter.cpp
FixedLenDecoderEmitter.cpp [TableGen] Make the map in InfoByHwMode protected. NFCI 2021-02-11 21:16:10 -08:00
GICombinerEmitter.cpp [llvm] Use llvm::any_of (NFC) 2021-01-04 11:42:47 -08:00
GlobalISelEmitter.cpp [TableGen][GlobalISel] Allow duplicate RendererFns 2021-02-12 15:05:32 +00:00
InfoByHwMode.cpp [TableGen] Use ListSeparator (NFC) 2021-02-09 22:14:27 -08:00
InfoByHwMode.h [TableGen] Make the map in InfoByHwMode protected. NFCI 2021-02-11 21:16:10 -08:00
InstrDocsEmitter.cpp [TableGen] Use ListSeparator (NFC) 2021-02-01 20:55:07 -08:00
InstrInfoEmitter.cpp [llvm] Drop unnecessary make_range (NFC) 2021-01-09 09:25:00 -08:00
IntrinsicEmitter.cpp [TableGen] Use ListSeparator (NFC) 2021-02-07 09:49:35 -08:00
OptEmitter.cpp
OptEmitter.h
OptParserEmitter.cpp [TableGen] Drop redundant const from return types (NFC) 2021-01-17 10:39:49 -08:00
OptRSTEmitter.cpp
PredicateExpander.cpp
PredicateExpander.h
PseudoLoweringEmitter.cpp
RegisterBankEmitter.cpp [TableGen] RegisterBankEmitter - Pass Twine by const reference instead of by value. NFCI. 2021-01-06 14:22:05 +00:00
RegisterInfoEmitter.cpp [TableGen] Use ListSeparator (NFC) 2021-02-12 23:44:30 -08:00
RISCVCompressInstEmitter.cpp [RISCV] Add way to mark CompressPats that should only be used for compressing. 2021-01-20 09:20:15 -08:00
SDNodeProperties.cpp
SDNodeProperties.h
SearchableTableEmitter.cpp [TableGen] Use ListSeparator (NFC) 2021-02-08 22:33:51 -08:00
SequenceToOffsetTable.h
SubtargetEmitter.cpp [TableGen] Use range-based for loops (NFC) 2021-02-01 20:55:09 -08:00
SubtargetFeatureInfo.cpp
SubtargetFeatureInfo.h
TableGen.cpp
TableGenBackends.h
tdtags
Types.cpp
Types.h
WebAssemblyDisassemblerEmitter.cpp [TableGen] Use llvm::append_range (NFC) 2021-01-02 09:24:13 -08:00
WebAssemblyDisassemblerEmitter.h
X86DisassemblerShared.h
X86DisassemblerTables.cpp [llvm] Use static_assert instead of assert (NFC) 2021-01-22 23:25:05 -08:00
X86DisassemblerTables.h
X86EVEX2VEXTablesEmitter.cpp
X86FoldTablesEmitter.cpp [llvm] Remove redundant return and continue statements (NFC) 2021-01-14 20:30:34 -08:00
X86ModRMFilters.cpp
X86ModRMFilters.h
X86RecognizableInstr.cpp
X86RecognizableInstr.h