[llvm] r208212 - [mips] Add INSN_<name> adverbs and start using them instead of AdditionalPredicates overrides
Daniel Sanders
daniel.sanders at imgtec.com
Wed May 7 07:11:46 PDT 2014
Author: dsanders
Date: Wed May 7 09:11:46 2014
New Revision: 208212
URL: http://llvm.org/viewvc/llvm-project?rev=208212&view=rev
Log:
[mips] Add INSN_<name> 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
Modified:
llvm/trunk/lib/Target/Mips/MipsInstrInfo.td
Modified: llvm/trunk/lib/Target/Mips/MipsInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrInfo.td?rev=208212&r1=208211&r2=208212&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsInstrInfo.td (original)
+++ llvm/trunk/lib/Target/Mips/MipsInstrInfo.td Wed May 7 09:11:46 2014
@@ -195,12 +195,16 @@ def IsBE : Predicate<"!Subtar
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<Predicate> InsnPredicates = [HasMips32r2]; }
class ISA_MIPS64R2 { list<Predicate> InsnPredicates = [HasMips64r2]; }
+class INSN_SWAP { list<Predicate> InsnPredicates = [HasSwap]; }
+class INSN_SEINREG { list<Predicate> InsnPredicates = [HasSEInReg]; }
+
//===----------------------------------------------------------------------===//
class MipsPat<dag pattern, dag result> : Pat<pattern, result>, PredicateControl {
@@ -811,15 +815,13 @@ class CountLeading1<string opstr, Regist
class SignExtInReg<string opstr, ValueType vt, RegisterOperand RO,
InstrItinClass itin> :
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<string opstr, RegisterOperand RO>:
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;
}
More information about the llvm-commits
mailing list