From af9db75943c11eebd642c1645d3c3f4003fe37e3 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 11 Oct 2006 21:03:53 +0000 Subject: [PATCH] Add properties to ComplexPattern. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30891 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMInstrInfo.td | 7 ++++--- lib/Target/PowerPC/PPCInstrInfo.td | 8 ++++---- lib/Target/Sparc/SparcInstrInfo.td | 4 ++-- lib/Target/TargetSelectionDAG.td | 4 +++- lib/Target/X86/X86InstrInfo.td | 4 ++-- lib/Target/X86/X86InstrX86-64.td | 2 +- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/lib/Target/ARM/ARMInstrInfo.td b/lib/Target/ARM/ARMInstrInfo.td index 3281e975bcd..9873e44eb8c 100644 --- a/lib/Target/ARM/ARMInstrInfo.td +++ b/lib/Target/ARM/ARMInstrInfo.td @@ -27,12 +27,13 @@ def memri : Operand { // Define ARM specific addressing mode. //Addressing Mode 1: data processing operands -def addr_mode1 : ComplexPattern; +def addr_mode1 : ComplexPattern; //register plus/minus 12 bit offset -def iaddr : ComplexPattern; +def iaddr : ComplexPattern; //register plus scaled register -//def raddr : ComplexPattern; +//def raddr : ComplexPattern; //===----------------------------------------------------------------------===// // Instructions diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td index f346717a3d7..b044d77db87 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.td +++ b/lib/Target/PowerPC/PPCInstrInfo.td @@ -259,10 +259,10 @@ def memrix : Operand { // memri where the imm is shifted 2 bits. } // Define PowerPC specific addressing mode. -def iaddr : ComplexPattern; -def xaddr : ComplexPattern; -def xoaddr : ComplexPattern; -def ixaddr : ComplexPattern; // "std" +def iaddr : ComplexPattern; +def xaddr : ComplexPattern; +def xoaddr : ComplexPattern; +def ixaddr : ComplexPattern; // "std" //===----------------------------------------------------------------------===// // PowerPC Instruction Predicate Definitions. diff --git a/lib/Target/Sparc/SparcInstrInfo.td b/lib/Target/Sparc/SparcInstrInfo.td index 6fc44819348..713f0e52d92 100644 --- a/lib/Target/Sparc/SparcInstrInfo.td +++ b/lib/Target/Sparc/SparcInstrInfo.td @@ -67,8 +67,8 @@ def SETHIimm : PatLeaf<(imm), [{ }], HI22>; // Addressing modes. -def ADDRrr : ComplexPattern; -def ADDRri : ComplexPattern; +def ADDRrr : ComplexPattern; +def ADDRri : ComplexPattern; // Address operands def MEMrr : Operand { diff --git a/lib/Target/TargetSelectionDAG.td b/lib/Target/TargetSelectionDAG.td index bd2b2e576c1..778212ecede 100644 --- a/lib/Target/TargetSelectionDAG.td +++ b/lib/Target/TargetSelectionDAG.td @@ -554,11 +554,13 @@ class Pat : Pattern; // RootNodes are the list of possible root nodes of the sub-dags to match. // e.g. X86 addressing mode - def addr : ComplexPattern<4, "SelectAddr", [add]>; // -class ComplexPattern roots = []> { +class ComplexPattern roots = [], list props = []> { ValueType Ty = ty; int NumOperands = numops; string SelectFunc = fn; list RootNodes = roots; + list Properties = props; } //===----------------------------------------------------------------------===// diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td index 27c84341791..11c67bff062 100644 --- a/lib/Target/X86/X86InstrInfo.td +++ b/lib/Target/X86/X86InstrInfo.td @@ -135,9 +135,9 @@ def brtarget : Operand; // // Define X86 specific addressing mode. -def addr : ComplexPattern; +def addr : ComplexPattern; def lea32addr : ComplexPattern; + [add, mul, shl, or, frameindex], []>; //===----------------------------------------------------------------------===// // X86 Instruction Format Definitions. diff --git a/lib/Target/X86/X86InstrX86-64.td b/lib/Target/X86/X86InstrX86-64.td index db060e61518..cd6ac5e03a4 100644 --- a/lib/Target/X86/X86InstrX86-64.td +++ b/lib/Target/X86/X86InstrX86-64.td @@ -38,7 +38,7 @@ def lea64_32mem : Operand { // Complex Pattern Definitions... // def lea64addr : ComplexPattern; + [add, mul, shl, or, frameindex, X86Wrapper], []>; //===----------------------------------------------------------------------===// // Instruction templates... -- 2.11.0