llvm-6502/utils/TableGen
Tom Stellard 898b9f020d TableGen: Generate a function for getting operand indices based on their defined names
This patch modifies TableGen to generate a function in
${TARGET}GenInstrInfo.inc called getNamedOperandIdx(), which can be used
to look up indices for operands based on their names.

In order to activate this feature for an instruction, you must set the
UseNamedOperandTable bit.

For example, if you have an instruction like:

def ADD : TargetInstr <(outs GPR:$dst), (ins GPR:$src0, GPR:$src1)>;

You can look up the operand indices using the new function, like this:

Target::getNamedOperandIdx(Target::ADD, Target::OpName::dst)  => 0
Target::getNamedOperandIdx(Target::ADD, Target::OpName::src0) => 1
Target::getNamedOperandIdx(Target::ADD, Target::OpName::src1) => 2

The operand names are case sensitive, so $dst and $DST are considered
different operands.

This change is useful for R600 which has instructions with a large number
of operands, many of which model single bit instruction configuration
values.  These configuration bits are common across most instructions,
but may have a different operand index depending on the instruction type.
It is useful to have a convenient way to look up the operand indices,
so these bits can be generically set on any instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184879 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 21:22:09 +00:00
..
AsmMatcherEmitter.cpp Handle tied sub-operands in AsmMatcherEmitter 2013-04-27 18:48:23 +00:00
AsmWriterEmitter.cpp This patch that sets the EmitAlias flag in td files 2013-02-05 08:32:10 +00:00
AsmWriterInst.cpp
AsmWriterInst.h
CallingConvEmitter.cpp
CMakeLists.txt Add TableGen ctags(1) emitter and helper script. 2013-03-21 23:40:38 +00:00
CodeEmitterGen.cpp
CodeGenDAGPatterns.cpp Allow types to be omitted in output patterns. 2013-03-24 19:37:00 +00:00
CodeGenDAGPatterns.h Make all unnamed RegisterClass TreePatternNodes typed MVT::i32. 2013-03-23 18:08:44 +00:00
CodeGenInstruction.cpp
CodeGenInstruction.h
CodeGenIntrinsics.h
CodeGenMapTable.cpp Fix for bug 15246 -- out-of-bound error in the TableGen backend, CodeGenMapTable.cpp. 2013-02-14 17:58:13 +00:00
CodeGenRegisters.cpp Make SubRegIndex size mandatory, following r183020. 2013-05-31 23:45:26 +00:00
CodeGenRegisters.h Make SubRegIndex size mandatory, following r183020. 2013-05-31 23:45:26 +00:00
CodeGenSchedule.cpp Support BufferSize on ProcResGroup for unified MOp schedulers. 2013-06-15 04:50:06 +00:00
CodeGenSchedule.h Support BufferSize on ProcResGroup for unified MOp schedulers. 2013-06-15 04:50:06 +00:00
CodeGenTarget.cpp Use ArrayRef<MVT::SimpleValueType> when possible. 2013-03-17 17:26:09 +00:00
CodeGenTarget.h Use ArrayRef<MVT::SimpleValueType> when possible. 2013-03-17 17:26:09 +00:00
CTagsEmitter.cpp Add TableGen ctags(1) emitter and helper script. 2013-03-21 23:40:38 +00:00
DAGISelEmitter.cpp
DAGISelMatcher.cpp
DAGISelMatcher.h
DAGISelMatcherEmitter.cpp Fix comments 2013-02-05 16:53:11 +00:00
DAGISelMatcherGen.cpp Allow types to be omitted in output patterns. 2013-03-24 19:37:00 +00:00
DAGISelMatcherOpt.cpp
DFAPacketizerEmitter.cpp
DisassemblerEmitter.cpp Add AArch64 as an experimental target. 2013-01-31 12:12:40 +00:00
FastISelEmitter.cpp Recognize ValueType operands in source patterns for fast-isel. 2013-05-22 20:45:11 +00:00
FixedLenDecoderEmitter.cpp TableGen/FixedLenDecoderEmitter.cpp: Fix a potential mask overflow in fieldFromInstruction(). 2012-12-26 06:43:14 +00:00
InstrInfoEmitter.cpp TableGen: Generate a function for getting operand indices based on their defined names 2013-06-25 21:22:09 +00:00
IntrinsicEmitter.cpp Use the AttributeSet instead of AttributeWithIndex. 2013-01-27 03:25:05 +00:00
LLVMBuild.txt
Makefile
OptParserEmitter.cpp Sort a few more #include lines in tools/... unittests/... and utils/... 2013-01-02 10:26:28 +00:00
PseudoLoweringEmitter.cpp PR14992 - Tablegen incorrectly converts ARM tLDMIA_UPD pseudo to tLDMIA 2013-02-13 19:21:47 +00:00
RegisterInfoEmitter.cpp Remove unimplemented definition. Found using [-Wunused-member-function]. 2013-06-06 17:52:45 +00:00
SequenceToOffsetTable.h
SetTheory.cpp
SetTheory.h
StringToOffsetTable.h
SubtargetEmitter.cpp Support BufferSize on ProcResGroup for unified MOp schedulers. 2013-06-15 04:50:06 +00:00
TableGen.cpp Add TableGen ctags(1) emitter and helper script. 2013-03-21 23:40:38 +00:00
TableGenBackends.h Add TableGen ctags(1) emitter and helper script. 2013-03-21 23:40:38 +00:00
tdtags Add TableGen ctags(1) emitter and helper script. 2013-03-21 23:40:38 +00:00
TGValueTypes.cpp
X86DisassemblerShared.h
X86DisassemblerTables.cpp
X86DisassemblerTables.h
X86ModRMFilters.cpp
X86ModRMFilters.h
X86RecognizableInstr.cpp Add support for encoding the HLE XACQUIRE and XRELEASE prefixes. 2013-06-18 17:08:10 +00:00
X86RecognizableInstr.h