From b49c58221831b500805a701d1680e85e5e1d772a Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Wed, 7 May 2014 14:11:46 +0000 Subject: [PATCH] [mips] Add INSN_ adverbs and start using them instead of AdditionalPredicates overrides Summary: No functional change Depends on D3641 Reviewers: vmedic Reviewed By: vmedic Differential Revision: http://reviews.llvm.org/D3642 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208212 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Mips/MipsInstrInfo.td | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/Target/Mips/MipsInstrInfo.td b/lib/Target/Mips/MipsInstrInfo.td index 033d5174db1..c20476d4fd5 100644 --- a/lib/Target/Mips/MipsInstrInfo.td +++ b/lib/Target/Mips/MipsInstrInfo.td @@ -195,12 +195,16 @@ def IsBE : Predicate<"!Subtarget.isLittle()">; def IsNotNaCl : Predicate<"!Subtarget.isTargetNaCl()">; //===----------------------------------------------------------------------===// -// Mips ISA membership adjectives. +// Mips ISA/ASE membership and instruction group membership adjectives. +// They are mutually exclusive. //===----------------------------------------------------------------------===// class ISA_MIPS32R2 { list InsnPredicates = [HasMips32r2]; } class ISA_MIPS64R2 { list InsnPredicates = [HasMips64r2]; } +class INSN_SWAP { list InsnPredicates = [HasSwap]; } +class INSN_SEINREG { list InsnPredicates = [HasSEInReg]; } + //===----------------------------------------------------------------------===// class MipsPat : Pat, PredicateControl { @@ -811,15 +815,13 @@ class CountLeading1: class SignExtInReg : InstSE<(outs RO:$rd), (ins RO:$rt), !strconcat(opstr, "\t$rd, $rt"), - [(set RO:$rd, (sext_inreg RO:$rt, vt))], itin, FrmR, opstr> { - let AdditionalPredicates = [HasSEInReg]; -} + [(set RO:$rd, (sext_inreg RO:$rt, vt))], itin, FrmR, opstr>, + INSN_SEINREG; // Subword Swap class SubwordSwap: InstSE<(outs RO:$rd), (ins RO:$rt), !strconcat(opstr, "\t$rd, $rt"), [], - NoItinerary, FrmR, opstr> { - let AdditionalPredicates = [HasSwap]; + NoItinerary, FrmR, opstr>, INSN_SWAP { let neverHasSideEffects = 1; }