Revert r354244 "[DAGCombiner] Eliminate dead stores to stack."
[llvm-complete.git] / lib / Target / Mips / Mips16ISelLowering.h
blob15be50959b7305564b1b1379c1da9281818890d5
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.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_MIPS_MIPS16ISELLOWERING_H
14 #define LLVM_LIB_TARGET_MIPS_MIPS16ISELLOWERING_H
16 #include "MipsISelLowering.h"
18 namespace llvm {
19 class Mips16TargetLowering : public MipsTargetLowering {
20 public:
21 explicit Mips16TargetLowering(const MipsTargetMachine &TM,
22 const MipsSubtarget &STI);
24 bool allowsMisalignedMemoryAccesses(EVT VT, unsigned AddrSpace,
25 unsigned Align,
26 bool *Fast) const override;
28 MachineBasicBlock *
29 EmitInstrWithCustomInserter(MachineInstr &MI,
30 MachineBasicBlock *MBB) const override;
32 private:
33 bool isEligibleForTailCallOptimization(
34 const CCState &CCInfo, unsigned NextStackOffset,
35 const MipsFunctionInfo &FI) const override;
37 void setMips16HardFloatLibCalls();
39 unsigned int
40 getMips16HelperFunctionStubNumber(ArgListTy &Args) const;
42 const char *getMips16HelperFunction
43 (Type* RetTy, ArgListTy &Args, bool &needHelper) const;
45 void
46 getOpndList(SmallVectorImpl<SDValue> &Ops,
47 std::deque< std::pair<unsigned, SDValue> > &RegsToPass,
48 bool IsPICCall, bool GlobalOrExternal, bool InternalLinkage,
49 bool IsCallReloc, CallLoweringInfo &CLI, SDValue Callee,
50 SDValue Chain) const override;
52 MachineBasicBlock *emitSel16(unsigned Opc, MachineInstr &MI,
53 MachineBasicBlock *BB) const;
55 MachineBasicBlock *emitSeliT16(unsigned Opc1, unsigned Opc2,
56 MachineInstr &MI,
57 MachineBasicBlock *BB) const;
59 MachineBasicBlock *emitSelT16(unsigned Opc1, unsigned Opc2,
60 MachineInstr &MI,
61 MachineBasicBlock *BB) const;
63 MachineBasicBlock *emitFEXT_T8I816_ins(unsigned BtOpc, unsigned CmpOpc,
64 MachineInstr &MI,
65 MachineBasicBlock *BB) const;
67 MachineBasicBlock *emitFEXT_T8I8I16_ins(unsigned BtOpc, unsigned CmpiOpc,
68 unsigned CmpiXOpc, bool ImmSigned,
69 MachineInstr &MI,
70 MachineBasicBlock *BB) const;
72 MachineBasicBlock *emitFEXT_CCRX16_ins(unsigned SltOpc, MachineInstr &MI,
73 MachineBasicBlock *BB) const;
75 MachineBasicBlock *emitFEXT_CCRXI16_ins(unsigned SltiOpc, unsigned SltiXOpc,
76 MachineInstr &MI,
77 MachineBasicBlock *BB) const;
81 #endif