1 //===-- MipsSEISelLowering.h - MipsSE DAG Lowering Interface ----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Subclass of MipsTargetLowering specialized for mips32/64.
12 //===----------------------------------------------------------------------===//
14 #ifndef MipsSEISELLOWERING_H
15 #define MipsSEISELLOWERING_H
17 #include "MipsISelLowering.h"
18 #include "MipsRegisterInfo.h"
21 class MipsSETargetLowering : public MipsTargetLowering {
23 explicit MipsSETargetLowering(MipsTargetMachine &TM);
25 void addMSAIntType(MVT::SimpleValueType Ty, const TargetRegisterClass *RC);
26 void addMSAFloatType(MVT::SimpleValueType Ty,
27 const TargetRegisterClass *RC);
29 virtual bool allowsUnalignedMemoryAccesses(EVT VT, bool *Fast) const;
31 virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const;
33 virtual SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const;
35 virtual MachineBasicBlock *
36 EmitInstrWithCustomInserter(MachineInstr *MI, MachineBasicBlock *MBB) const;
38 virtual bool isShuffleMaskLegal(const SmallVectorImpl<int> &Mask,
43 virtual const TargetRegisterClass *getRepRegClassFor(MVT VT) const {
44 if (VT == MVT::Untyped)
45 return Subtarget->hasDSP() ? &Mips::ACC64DSPRegClass :
48 return TargetLowering::getRepRegClassFor(VT);
53 isEligibleForTailCallOptimization(const MipsCC &MipsCCInfo,
54 unsigned NextStackOffset,
55 const MipsFunctionInfo& FI) const;
58 getOpndList(SmallVectorImpl<SDValue> &Ops,
59 std::deque< std::pair<unsigned, SDValue> > &RegsToPass,
60 bool IsPICCall, bool GlobalOrExternal, bool InternalLinkage,
61 CallLoweringInfo &CLI, SDValue Callee, SDValue Chain) const;
63 SDValue lowerLOAD(SDValue Op, SelectionDAG &DAG) const;
64 SDValue lowerSTORE(SDValue Op, SelectionDAG &DAG) const;
66 SDValue lowerMulDiv(SDValue Op, unsigned NewOpc, bool HasLo, bool HasHi,
67 SelectionDAG &DAG) const;
69 SDValue lowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const;
70 SDValue lowerINTRINSIC_W_CHAIN(SDValue Op, SelectionDAG &DAG) const;
71 SDValue lowerINTRINSIC_VOID(SDValue Op, SelectionDAG &DAG) const;
73 MachineBasicBlock *emitBPOSGE32(MachineInstr *MI,
74 MachineBasicBlock *BB) const;
75 MachineBasicBlock *emitMSACBranchPseudo(MachineInstr *MI,
76 MachineBasicBlock *BB,
77 unsigned BranchOp) const;
81 #endif // MipsSEISELLOWERING_H