[llvm-commits] [llvm] r146081 - /llvm/trunk/lib/Target/Mips/MipsInstrInfo.td
Akira Hatanaka
ahatanaka at mips.com
Wed Dec 7 13:54:54 PST 2011
Author: ahatanak
Date: Wed Dec 7 15:54:54 2011
New Revision: 146081
URL: http://llvm.org/viewvc/llvm-project?rev=146081&view=rev
Log:
Define base class for WrapperPICPat.
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=146081&r1=146080&r2=146081&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsInstrInfo.td (original)
+++ llvm/trunk/lib/Target/Mips/MipsInstrInfo.td Wed Dec 7 15:54:54 2011
@@ -973,15 +973,15 @@
(ADDiu CPURegs:$hi, tglobaltlsaddr:$lo)>;
// wrapper_pic
-class WrapperPICPat<SDNode node>:
+class WrapperPICPat<SDNode node, Instruction ADDiuOp, Register GPReg>:
Pat<(MipsWrapperPIC node:$in),
- (ADDiu GP, node:$in)>;
+ (ADDiuOp GPReg, node:$in)>;
-def : WrapperPICPat<tglobaladdr>;
-def : WrapperPICPat<tconstpool>;
-def : WrapperPICPat<texternalsym>;
-def : WrapperPICPat<tblockaddress>;
-def : WrapperPICPat<tjumptable>;
+def : WrapperPICPat<tglobaladdr, ADDiu, GP>;
+def : WrapperPICPat<tconstpool, ADDiu, GP>;
+def : WrapperPICPat<texternalsym, ADDiu, GP>;
+def : WrapperPICPat<tblockaddress, ADDiu, GP>;
+def : WrapperPICPat<tjumptable, ADDiu, GP>;
// Mips does not have "not", so we expand our way
def : Pat<(not CPURegs:$in),
More information about the llvm-commits
mailing list