LLVM 22.0.0git
Mips16ISelLowering.h
Go to the documentation of this file.
1//===-- Mips16ISelLowering.h - Mips16 DAG Lowering Interface ----*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Subclass of MipsTargetLowering specialized for mips16.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_MIPS_MIPS16ISELLOWERING_H
14#define LLVM_LIB_TARGET_MIPS_MIPS16ISELLOWERING_H
15
16#include "MipsISelLowering.h"
17
18namespace llvm {
20 public:
21 explicit Mips16TargetLowering(const MipsTargetMachine &TM,
22 const MipsSubtarget &STI);
23
24 bool allowsMisalignedMemoryAccesses(EVT VT, unsigned AddrSpace,
25 Align Alignment,
27 unsigned *Fast) const override;
28
31 MachineBasicBlock *MBB) const override;
32
33 private:
34 bool isEligibleForTailCallOptimization(
35 const CCState &CCInfo, unsigned NextStackOffset,
36 const MipsFunctionInfo &FI) const override;
37
38 unsigned int
39 getMips16HelperFunctionStubNumber(ArgListTy &Args) const;
40
41 const char *getMips16HelperFunction
42 (Type* RetTy, ArgListTy &Args, bool &needHelper) const;
43
44 void
45 getOpndList(SmallVectorImpl<SDValue> &Ops,
46 std::deque< std::pair<unsigned, SDValue> > &RegsToPass,
47 bool IsPICCall, bool GlobalOrExternal, bool InternalLinkage,
48 bool IsCallReloc, CallLoweringInfo &CLI, SDValue Callee,
49 SDValue Chain) const override;
50
51 MachineBasicBlock *emitSel16(unsigned Opc, MachineInstr &MI,
52 MachineBasicBlock *BB) const;
53
54 MachineBasicBlock *emitSeliT16(unsigned Opc1, unsigned Opc2,
56 MachineBasicBlock *BB) const;
57
58 MachineBasicBlock *emitSelT16(unsigned Opc1, unsigned Opc2,
60 MachineBasicBlock *BB) const;
61
62 MachineBasicBlock *emitFEXT_T8I816_ins(unsigned BtOpc, unsigned CmpOpc,
64 MachineBasicBlock *BB) const;
65
66 MachineBasicBlock *emitFEXT_T8I8I16_ins(unsigned BtOpc, unsigned CmpiOpc,
67 unsigned CmpiXOpc, bool ImmSigned,
69 MachineBasicBlock *BB) const;
70
71 MachineBasicBlock *emitFEXT_CCRX16_ins(unsigned SltOpc, MachineInstr &MI,
72 MachineBasicBlock *BB) const;
73
74 MachineBasicBlock *emitFEXT_CCRXI16_ins(unsigned SltiOpc, unsigned SltiXOpc,
76 MachineBasicBlock *BB) const;
77 };
78}
79
80#endif
MachineBasicBlock & MBB
IRTranslator LLVM IR MI
const AbstractManglingParser< Derived, Alloc >::OperatorInfo AbstractManglingParser< Derived, Alloc >::Ops[]
CCState - This class holds information needed while lowering arguments and return values.
Representation of each machine instruction.
Flags
Flags values. These may be or'd together.
MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr &MI, MachineBasicBlock *MBB) const override
This method should be implemented by targets that mark instructions with the 'usesCustomInserter' fla...
Mips16TargetLowering(const MipsTargetMachine &TM, const MipsSubtarget &STI)
bool allowsMisalignedMemoryAccesses(EVT VT, unsigned AddrSpace, Align Alignment, MachineMemOperand::Flags Flags, unsigned *Fast) const override
Determine if the target supports unaligned memory accesses.
MipsFunctionInfo - This class is derived from MachineFunction private Mips target-specific informatio...
MipsTargetLowering(const MipsTargetMachine &TM, const MipsSubtarget &STI)
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
std::vector< ArgListEntry > ArgListTy
The instances of the Type class are immutable: once they are created, they are never changed.
Definition Type.h:45
@ Fast
Attempts to make calls as fast as possible (e.g.
Definition CallingConv.h:41
This is an optimization pass for GlobalISel generic memory operations.
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition Alignment.h:39
Extended Value Type.
Definition ValueTypes.h:35
This structure contains all information that is necessary for lowering calls.