llvm/utils/TableGen
Craig Topper e32e1f4c62 Use makeArrayRef and None to simplify some code in a tablegen register info file. Additionally const correct a couple static array.
Previously the code added an extra nullptr entry to a static array and then created an ArrayRef with a size one less than the static array. If there were no other entries the array would just contain the nullptr and the ArrayRef would be crated with size 0.

Instead, put the right number of entries in the array and explicitly emit 'None' if the size would be 0. This allows the static array constructor of makeArrayRef to be used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248244 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-22 05:37:12 +00:00
..
AsmMatcherEmitter.cpp [TableGen] Use range-based for loops and make a helper function static. NFC 2015-09-13 18:01:25 +00:00
AsmWriterEmitter.cpp Remove and forbid raw_svector_ostream::flush() calls. 2015-08-13 18:12:56 +00:00
AsmWriterInst.cpp Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
AsmWriterInst.h [MCInstPrinter] Enable MCInstPrinter to change its behavior based on the 2015-03-27 20:36:02 +00:00
CallingConvEmitter.cpp Move most user of TargetMachine::getDataLayout to the Module one 2015-07-16 06:11:10 +00:00
CMakeLists.txt Move SetTheory from utils/TableGen into lib/TableGen so Clang can use it. 2014-06-17 13:10:38 +00:00
CodeEmitterGen.cpp Replace size method call of containers to empty method where appropriate 2015-01-15 11:41:30 +00:00
CodeGenDAGPatterns.cpp Fix typos. 2015-09-12 01:17:08 +00:00
CodeGenDAGPatterns.h Fix typos. 2015-09-12 01:17:08 +00:00
CodeGenInstruction.cpp Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
CodeGenInstruction.h [TableGen] Use the SMLoc header file instead of SourceMgr header file in a couple places. NFC 2015-06-08 01:35:40 +00:00
CodeGenIntrinsics.h Emit argmemonly attribute for intrinsics. 2015-08-13 17:40:04 +00:00
CodeGenMapTable.cpp [TableGen] Rename ListInit::getSize to just 'size' to be more consistent. 2015-06-02 04:15:57 +00:00
CodeGenRegisters.cpp [TableGen] Rename ListInit::getSize to just 'size' to be more consistent. 2015-06-02 04:15:57 +00:00
CodeGenRegisters.h RegAllocGreedy: Allow target to specify register class ordering. 2015-03-31 19:57:53 +00:00
CodeGenSchedule.cpp Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
CodeGenSchedule.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
CodeGenTarget.cpp [TableGen] Allow TokenTy in intrinsic signatures 2015-09-02 13:36:25 +00:00
CodeGenTarget.h Use unique_ptr instead of DeleteContainerSeconds. 2014-12-10 06:18:57 +00:00
CTagsEmitter.cpp [TableGen] Remove unnecessary default constructed SMLoc that just existed to return. Instead just call the default constructor in the return. 2015-06-08 01:35:45 +00:00
DAGISelEmitter.cpp Use unique_ptr to remove explicit delete. 2014-12-15 00:40:07 +00:00
DAGISelMatcher.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 07:20:03 +00:00
DAGISelMatcher.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
DAGISelMatcherEmitter.cpp [TableGen][DAGISel] Dedup predicates with same code to run. NFCI. 2015-08-27 20:43:34 +00:00
DAGISelMatcherGen.cpp Fix tablegen's PrintFatalError function to run registered file 2015-05-11 22:17:13 +00:00
DAGISelMatcherOpt.cpp Use unique_ptr to remove explicit delete. 2014-12-15 00:40:07 +00:00
DFAPacketizerEmitter.cpp Replace size method call of containers to empty method where appropriate 2015-01-15 11:41:30 +00:00
DisassemblerEmitter.cpp [TableGen] Improve decoding options for non-orthogonal instructions 2015-07-15 08:04:27 +00:00
FastISelEmitter.cpp Change order of tablegen generated fast-isel instruction code to be 2014-11-14 21:05:45 +00:00
FixedLenDecoderEmitter.cpp Fix three typos in comments; "easilly" -> "easily". 2015-08-18 22:41:58 +00:00
InstrInfoEmitter.cpp Re-commit r247216: "Fix Clang-tidy misc-use-override warnings, other minor fixes" 2015-09-10 16:49:58 +00:00
IntrinsicEmitter.cpp [TableGen] Allow TokenTy in intrinsic signatures 2015-09-02 13:36:25 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
Makefile Remove exception handling usage from tblgen. 2012-10-25 20:33:17 +00:00
module.modulemap [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00
OptParserEmitter.cpp Option: Propagate flags from groups to options in each group 2014-07-12 00:18:58 +00:00
PseudoLoweringEmitter.cpp MC: Modernize MCOperand API naming. NFC. 2015-05-13 18:37:00 +00:00
RegisterInfoEmitter.cpp Use makeArrayRef and None to simplify some code in a tablegen register info file. Additionally const correct a couple static array. 2015-09-22 05:37:12 +00:00
SequenceToOffsetTable.h Reduce size of some tables in tablegen register info output. 2014-11-22 18:30:18 +00:00
SubtargetEmitter.cpp Revert r247692: Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC. 2015-09-15 16:17:27 +00:00
TableGen.cpp Use range-based for loops. NFC 2014-12-11 07:04:54 +00:00
TableGenBackends.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
tdtags Add TableGen ctags(1) emitter and helper script. 2013-03-21 23:40:38 +00:00
X86DisassemblerShared.h Revert r234389. It really was needed but really should have been cstring instead of string.h 2015-04-08 06:03:17 +00:00
X86DisassemblerTables.cpp AVX-512: Added all AVX-512 forms of Vector Convert for Float/Double/Int/Long types. 2015-07-13 13:26:20 +00:00
X86DisassemblerTables.h [X86] Make the instructions that use AdSize16/32/64 co-exist together without using mode predicates. 2015-01-02 07:02:25 +00:00
X86ModRMFilters.cpp Second attempt at Removing special form of AddRegFrm used by FP instructions. These instructions can be handled by MRMXr instead. 2014-01-01 14:22:37 +00:00
X86ModRMFilters.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
X86RecognizableInstr.cpp AVX-512: Added all SKX forms of GATHER instructions. 2015-06-28 10:53:29 +00:00
X86RecognizableInstr.h [X86] Remove the single AdSize indicator and replace it with separate AdSize16/32/64 flags. 2014-12-24 06:05:22 +00:00