LLVM API Documentation

Mips16ISelLowering.h
Go to the documentation of this file.
00001 //===-- Mips16ISelLowering.h - Mips16 DAG Lowering Interface ----*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // Subclass of MipsTargetLowering specialized for mips16.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef LLVM_LIB_TARGET_MIPS_MIPS16ISELLOWERING_H
00015 #define LLVM_LIB_TARGET_MIPS_MIPS16ISELLOWERING_H
00016 
00017 #include "MipsISelLowering.h"
00018 
00019 namespace llvm {
00020   class Mips16TargetLowering : public MipsTargetLowering  {
00021   public:
00022     explicit Mips16TargetLowering(MipsTargetMachine &TM,
00023                                   const MipsSubtarget &STI);
00024 
00025     bool allowsMisalignedMemoryAccesses(EVT VT, unsigned AddrSpace,
00026                                         unsigned Align,
00027                                         bool *Fast) const override;
00028 
00029     MachineBasicBlock *
00030     EmitInstrWithCustomInserter(MachineInstr *MI,
00031                                 MachineBasicBlock *MBB) const override;
00032 
00033   private:
00034     bool isEligibleForTailCallOptimization(const MipsCC &MipsCCInfo,
00035                                      unsigned NextStackOffset,
00036                                      const MipsFunctionInfo& FI) const override;
00037 
00038     void setMips16HardFloatLibCalls();
00039 
00040     unsigned int
00041       getMips16HelperFunctionStubNumber(ArgListTy &Args) const;
00042 
00043     const char *getMips16HelperFunction
00044       (Type* RetTy, ArgListTy &Args, bool &needHelper) const;
00045 
00046     void
00047     getOpndList(SmallVectorImpl<SDValue> &Ops,
00048                 std::deque< std::pair<unsigned, SDValue> > &RegsToPass,
00049                 bool IsPICCall, bool GlobalOrExternal, bool InternalLinkage,
00050                 CallLoweringInfo &CLI, SDValue Callee,
00051                 SDValue Chain) const override;
00052 
00053     MachineBasicBlock *emitSel16(unsigned Opc, MachineInstr *MI,
00054                                  MachineBasicBlock *BB) const;
00055 
00056     MachineBasicBlock *emitSeliT16(unsigned Opc1, unsigned Opc2,
00057                                    MachineInstr *MI,
00058                                    MachineBasicBlock *BB) const;
00059 
00060     MachineBasicBlock *emitSelT16(unsigned Opc1, unsigned Opc2,
00061                                   MachineInstr *MI,
00062                                   MachineBasicBlock *BB) const;
00063 
00064     MachineBasicBlock *emitFEXT_T8I816_ins(unsigned BtOpc, unsigned CmpOpc,
00065                                            MachineInstr *MI,
00066                                            MachineBasicBlock *BB) const;
00067 
00068     MachineBasicBlock *emitFEXT_T8I8I16_ins(
00069       unsigned BtOpc, unsigned CmpiOpc, unsigned CmpiXOpc, bool ImmSigned,
00070       MachineInstr *MI,  MachineBasicBlock *BB) const;
00071 
00072     MachineBasicBlock *emitFEXT_CCRX16_ins(
00073       unsigned SltOpc,
00074       MachineInstr *MI,  MachineBasicBlock *BB) const;
00075 
00076     MachineBasicBlock *emitFEXT_CCRXI16_ins(
00077       unsigned SltiOpc, unsigned SltiXOpc,
00078       MachineInstr *MI,  MachineBasicBlock *BB )const;
00079   };
00080 }
00081 
00082 #endif