Path: blob/main/contrib/llvm-project/llvm/lib/Target/Mips/Mips16ISelLowering.h
35269 views
//===-- Mips16ISelLowering.h - Mips16 DAG Lowering Interface ----*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// Subclass of MipsTargetLowering specialized for mips16.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_MIPS_MIPS16ISELLOWERING_H13#define LLVM_LIB_TARGET_MIPS_MIPS16ISELLOWERING_H1415#include "MipsISelLowering.h"1617namespace llvm {18class Mips16TargetLowering : public MipsTargetLowering {19public:20explicit Mips16TargetLowering(const MipsTargetMachine &TM,21const MipsSubtarget &STI);2223bool allowsMisalignedMemoryAccesses(EVT VT, unsigned AddrSpace,24Align Alignment,25MachineMemOperand::Flags Flags,26unsigned *Fast) const override;2728MachineBasicBlock *29EmitInstrWithCustomInserter(MachineInstr &MI,30MachineBasicBlock *MBB) const override;3132private:33bool isEligibleForTailCallOptimization(34const CCState &CCInfo, unsigned NextStackOffset,35const MipsFunctionInfo &FI) const override;3637void setMips16HardFloatLibCalls();3839unsigned int40getMips16HelperFunctionStubNumber(ArgListTy &Args) const;4142const char *getMips16HelperFunction43(Type* RetTy, ArgListTy &Args, bool &needHelper) const;4445void46getOpndList(SmallVectorImpl<SDValue> &Ops,47std::deque< std::pair<unsigned, SDValue> > &RegsToPass,48bool IsPICCall, bool GlobalOrExternal, bool InternalLinkage,49bool IsCallReloc, CallLoweringInfo &CLI, SDValue Callee,50SDValue Chain) const override;5152MachineBasicBlock *emitSel16(unsigned Opc, MachineInstr &MI,53MachineBasicBlock *BB) const;5455MachineBasicBlock *emitSeliT16(unsigned Opc1, unsigned Opc2,56MachineInstr &MI,57MachineBasicBlock *BB) const;5859MachineBasicBlock *emitSelT16(unsigned Opc1, unsigned Opc2,60MachineInstr &MI,61MachineBasicBlock *BB) const;6263MachineBasicBlock *emitFEXT_T8I816_ins(unsigned BtOpc, unsigned CmpOpc,64MachineInstr &MI,65MachineBasicBlock *BB) const;6667MachineBasicBlock *emitFEXT_T8I8I16_ins(unsigned BtOpc, unsigned CmpiOpc,68unsigned CmpiXOpc, bool ImmSigned,69MachineInstr &MI,70MachineBasicBlock *BB) const;7172MachineBasicBlock *emitFEXT_CCRX16_ins(unsigned SltOpc, MachineInstr &MI,73MachineBasicBlock *BB) const;7475MachineBasicBlock *emitFEXT_CCRXI16_ins(unsigned SltiOpc, unsigned SltiXOpc,76MachineInstr &MI,77MachineBasicBlock *BB) const;78};79}8081#endif828384