[mips] Define two subclasses of MipsTargetLowering. Mips16TargetLowering is for
[oota-llvm.git] / lib / Target / Mips / MipsSEISelLowering.h
1 //===-- MipsSEISelLowering.h - MipsSE DAG Lowering Interface ----*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // Subclass of MipsTargetLowering specialized for mips32/64.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef MipsSEISELLOWERING_H
15 #define MipsSEISELLOWERING_H
16
17 #include "MipsISelLowering.h"
18
19 namespace llvm {
20   class MipsSETargetLowering : public MipsTargetLowering  {
21   public:
22     explicit MipsSETargetLowering(MipsTargetMachine &TM);
23
24     virtual bool allowsUnalignedMemoryAccesses(EVT VT, bool *Fast) const;
25
26     virtual MachineBasicBlock *
27     EmitInstrWithCustomInserter(MachineInstr *MI, MachineBasicBlock *MBB) const;
28
29   private:
30     virtual bool
31     isEligibleForTailCallOptimization(const MipsCC &MipsCCInfo,
32                                       unsigned NextStackOffset,
33                                       const MipsFunctionInfo& FI) const;
34
35     virtual void
36     getOpndList(SmallVectorImpl<SDValue> &Ops,
37                 std::deque< std::pair<unsigned, SDValue> > &RegsToPass,
38                 bool IsPICCall, bool GlobalOrExternal, bool InternalLinkage,
39                 CallLoweringInfo &CLI, SDValue Callee, SDValue Chain) const;
40
41     MachineBasicBlock *emitBPOSGE32(MachineInstr *MI,
42                                     MachineBasicBlock *BB) const;
43   };
44 }
45
46 #endif // MipsSEISELLOWERING_H