From 0fc71988900e600f3ef5b13d9682e2bbab92811d Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 8 Dec 2005 02:00:36 +0000 Subject: Added support for ComplexPattern. These are patterns that require C++ pattern matching code that is not currently auto-generated by tblgen, e.g. X86 addressing mode. Selection routines for complex patterns can return multiple operands, e.g. X86 addressing mode returns 4. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24634 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/CodeGenTarget.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'utils/TableGen/CodeGenTarget.cpp') diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp index fceb61f44c..d4d4187924 100644 --- a/utils/TableGen/CodeGenTarget.cpp +++ b/utils/TableGen/CodeGenTarget.cpp @@ -330,3 +330,12 @@ unsigned CodeGenInstruction::getOperandNamed(const std::string &Name) const { throw "Instruction '" + TheDef->getName() + "' does not have an operand named '$" + Name + "'!"; } + +//===----------------------------------------------------------------------===// +// ComplexPattern implementation +// +ComplexPattern::ComplexPattern(Record *R) { + NumOperands = R->getValueAsInt("NumOperands"); + SelectFunc = R->getValueAsString("SelectFunc"); + MatchingNodes = R->getValueAsListOfDefs("MatchingNodes"); +} -- cgit v1.2.3