llvm-6502/utils/TableGen
Ulrich Weigand ec8d1a5b72 Extend TableGen instruction selection matcher to improve handling
of complex instruction operands (e.g. address modes).

Currently, if a Pat pattern creates an instruction that has a complex
operand (i.e. one that consists of multiple sub-operands at the MI
level), this operand must match a ComplexPattern DAG pattern with the
correct number of output operands.

This commit extends TableGen to alternatively allow match a complex
operands against multiple separate operands at the DAG level.

This allows using Pat patterns to match pre-increment nodes like
pre_store (which must have separate operands at the DAG level) onto
an instruction pattern that uses a multi-operand memory operand,
like the following example on PowerPC (will be committed as a
follow-on patch):

  def STWU  : DForm_1<37, (outs ptr_rc:$ea_res), (ins GPRC:$rS, memri:$dst),
                    "stwu $rS, $dst", LdStStoreUpd, []>,
                    RegConstraint<"$dst.reg = $ea_res">, NoEncode<"$ea_res">;

  def : Pat<(pre_store GPRC:$rS, ptr_rc:$ptrreg, iaddroff:$ptroff),
            (STWU GPRC:$rS, iaddroff:$ptroff, ptr_rc:$ptrreg)>;

Here, the pair of "ptroff" and "ptrreg" operands is matched onto the
complex operand "dst" of class "memri" in the "STWU" instruction.

Approved by Jakob Stoklund Olesen.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177428 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-19 19:51:09 +00:00
..
AsmMatcherEmitter.cpp Allow targets to add custom asm operand matching logic. 2013-02-06 06:00:06 +00:00
AsmWriterEmitter.cpp This patch that sets the EmitAlias flag in td files 2013-02-05 08:32:10 +00:00
AsmWriterInst.cpp Remove exception handling usage from tblgen. 2012-10-25 20:33:17 +00:00
AsmWriterInst.h
CallingConvEmitter.cpp Remove exception handling usage from tblgen. 2012-10-25 20:33:17 +00:00
CMakeLists.txt Remove edis - the enhanced disassembler. Fixes PR14654. 2012-12-19 19:55:47 +00:00
CodeEmitterGen.cpp Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
CodeGenDAGPatterns.cpp Extend TableGen instruction selection matcher to improve handling 2013-03-19 19:51:09 +00:00
CodeGenDAGPatterns.h Extract a method. 2013-03-18 04:08:07 +00:00
CodeGenInstruction.cpp Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
CodeGenInstruction.h Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
CodeGenIntrinsics.h Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
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 [TableGen] Fix ICE on MSVC 2012 Release builds. 2013-02-26 21:29:47 +00:00
CodeGenRegisters.h Use ArrayRef<MVT::SimpleValueType> when possible. 2013-03-17 17:26:09 +00:00
CodeGenSchedule.cpp TableGen fix for the new machine model. 2013-03-18 20:42:25 +00:00
CodeGenSchedule.h Machine model. Allow mixed itinerary classes and SchedRW lists. 2013-03-16 18:58:55 +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
DAGISelEmitter.cpp Write llvm-tblgen backends as functions instead of sub-classes. 2012-06-11 15:37:55 +00:00
DAGISelMatcher.cpp Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
DAGISelMatcher.h Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
DAGISelMatcherEmitter.cpp Fix comments 2013-02-05 16:53:11 +00:00
DAGISelMatcherGen.cpp Extend TableGen instruction selection matcher to improve handling 2013-03-19 19:51:09 +00:00
DAGISelMatcherOpt.cpp
DFAPacketizerEmitter.cpp Fix PR14568: Avoid the DFA packetizer from making an invalid read 2012-12-10 22:45:57 +00:00
DisassemblerEmitter.cpp Add AArch64 as an experimental target. 2013-01-31 12:12:40 +00:00
FastISelEmitter.cpp Remove exception handling usage from tblgen. 2012-10-25 20:33:17 +00:00
FixedLenDecoderEmitter.cpp TableGen/FixedLenDecoderEmitter.cpp: Fix a potential mask overflow in fieldFromInstruction(). 2012-12-26 06:43:14 +00:00
InstrInfoEmitter.cpp Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
IntrinsicEmitter.cpp Use the AttributeSet instead of AttributeWithIndex. 2013-01-27 03:25:05 +00:00
LLVMBuild.txt
Makefile Remove exception handling usage from tblgen. 2012-10-25 20:33:17 +00:00
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 Use ArrayRef<MVT::SimpleValueType> when possible. 2013-03-17 17:26:09 +00:00
SequenceToOffsetTable.h Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
SetTheory.cpp Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
SetTheory.h Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
StringToOffsetTable.h Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
SubtargetEmitter.cpp Machine model. Allow mixed itinerary classes and SchedRW lists. 2013-03-16 18:58:55 +00:00
TableGen.cpp Remove edis - the enhanced disassembler. Fixes PR14654. 2012-12-19 19:55:47 +00:00
TableGenBackends.h Remove edis - the enhanced disassembler. Fixes PR14654. 2012-12-19 19:55:47 +00:00
TGValueTypes.cpp Remove extra semicolons. 2012-10-11 22:25:56 +00:00
X86DisassemblerShared.h Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
X86DisassemblerTables.cpp Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
X86DisassemblerTables.h Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
X86ModRMFilters.cpp
X86ModRMFilters.h Fix Doxygen issues: 2012-09-13 12:34:29 +00:00
X86RecognizableInstr.cpp Fixes disassembler crashes on 2013 Haswell RTM instructions. 2013-03-11 21:17:13 +00:00
X86RecognizableInstr.h Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00