LLVM 22.0.0git
CSKYInstrInfo.h
Go to the documentation of this file.
1//===-- CSKYInstrInfo.h - CSKY Instruction Information --------*- 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// This file contains the CSKY implementation of the TargetInstrInfo class.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_CSKY_CSKYINSTRINFO_H
14#define LLVM_LIB_TARGET_CSKY_CSKYINSTRINFO_H
15
18
19#define GET_INSTRINFO_HEADER
20#include "CSKYGenInstrInfo.inc"
21
22namespace llvm {
23
24class CSKYRegisterInfo;
25class CSKYSubtarget;
26
28 bool v2sf;
29 bool v2df;
30 bool v3sf;
31 bool v3df;
32
33protected:
35
36public:
38
40 int &FrameIndex) const override;
42 int &FrameIndex) const override;
43
46 bool IsKill, int FrameIndex, const TargetRegisterClass *RC, Register VReg,
47 MachineInstr::MIFlag Flags = MachineInstr::NoFlags) const override;
48
51 int FrameIndex, const TargetRegisterClass *RC, Register VReg,
52 MachineInstr::MIFlag Flags = MachineInstr::NoFlags) const override;
53
55 const DebugLoc &DL, Register DestReg, Register SrcReg,
56 bool KillSrc, bool RenamableDest = false,
57 bool RenamableSrc = false) const override;
58
61 const DebugLoc &DL,
62 int *BytesAdded = nullptr) const override;
63
67 bool AllowModify = false) const override;
68
70 int *BytesRemoved = nullptr) const override;
71
72 bool
74
76
77 unsigned getInstSizeInBytes(const MachineInstr &MI) const override;
78
80
81 // Materializes the given integer Val into DstReg.
83 const DebugLoc &DL, uint64_t Val,
85};
86
87} // namespace llvm
88
89#endif // LLVM_LIB_TARGET_CSKY_CSKYINSTRINFO_H
MachineBasicBlock & MBB
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
MachineBasicBlock MachineBasicBlock::iterator MBBI
IRTranslator LLVM IR MI
const SmallVectorImpl< MachineOperand > MachineBasicBlock * TBB
const SmallVectorImpl< MachineOperand > & Cond
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:41
unsigned getInstSizeInBytes(const MachineInstr &MI) const override
unsigned removeBranch(MachineBasicBlock &MBB, int *BytesRemoved=nullptr) const override
unsigned insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef< MachineOperand > Cond, const DebugLoc &DL, int *BytesAdded=nullptr) const override
CSKYInstrInfo(const CSKYSubtarget &STI, const CSKYRegisterInfo &RI)
const CSKYSubtarget & STI
MachineBasicBlock * getBranchDestBlock(const MachineInstr &MI) const override
bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify=false) const override
void storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, Register SrcReg, bool IsKill, int FrameIndex, const TargetRegisterClass *RC, Register VReg, MachineInstr::MIFlag Flags=MachineInstr::NoFlags) const override
Register movImm(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, uint64_t Val, MachineInstr::MIFlag Flag=MachineInstr::NoFlags) const
Register isLoadFromStackSlot(const MachineInstr &MI, int &FrameIndex) const override
Register getGlobalBaseReg(MachineFunction &MF) const
bool reverseBranchCondition(SmallVectorImpl< MachineOperand > &Cond) const override
void loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, Register DestReg, int FrameIndex, const TargetRegisterClass *RC, Register VReg, MachineInstr::MIFlag Flags=MachineInstr::NoFlags) const override
Register isStoreToStackSlot(const MachineInstr &MI, int &FrameIndex) const override
void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const DebugLoc &DL, Register DestReg, Register SrcReg, bool KillSrc, bool RenamableDest=false, bool RenamableSrc=false) const override
A debug info location.
Definition DebugLoc.h:124
MachineInstrBundleIterator< MachineInstr > iterator
Representation of each machine instruction.
Wrapper class representing virtual and physical registers.
Definition Register.h:20
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This is an optimization pass for GlobalISel generic memory operations.