LLVM 24.0.0git
PISAInstrInfo.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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/// \file
10/// This file declares instruction information for the PISA target.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_LIB_TARGET_PISA_PISAINSTRINFO_H
15#define LLVM_LIB_TARGET_PISA_PISAINSTRINFO_H
16
17#include "PISARegisterInfo.h"
19
20#define GET_INSTRINFO_HEADER
21#include "PISAGenInstrInfo.inc"
22
23#define GET_INSTRINFO_OPERAND_ENUM
24#include "PISAGenInstrInfo.inc"
25
26namespace llvm {
27class PISASubtarget;
28
30 const PISARegisterInfo RI;
31
32public:
33 PISAInstrInfo(const PISASubtarget &STI);
34
35 const PISARegisterInfo &getRegisterInfo() const { return RI; }
36 bool isNoEmissionInstr(const MachineInstr &MI) const;
37 bool isFunctionParamInstr(const MachineInstr &MI) const;
38
42 bool AllowModify = false) const override;
43
45 int *BytesRemoved = nullptr) const override;
46
49 const DebugLoc &DL,
50 int *BytesAdded = nullptr) const override;
51
52 bool
54
55 bool expandPostRAPseudo(MachineInstr &MI) const override;
56
58 const MachineFunction &MF) const override;
59
61 const DebugLoc &DL, Register DestReg, Register SrcReg,
62 bool KillSrc, bool RenamableDest = false,
63 bool RenamableSrc = false) const override;
64};
65} // namespace llvm
66
67#endif // LLVM_LIB_TARGET_PISA_PISAINSTRINFO_H
MachineBasicBlock & MBB
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
IRTranslator LLVM IR MI
SDValue SrcReg
SmallVector< MachineOperand, 4 > Cond
#define I(x, y, z)
Definition MD5.cpp:57
This file declares register information for the PISA target.
const SmallVectorImpl< MachineOperand > MachineBasicBlock * TBB
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:40
A debug info location.
Definition DebugLoc.h:126
MachineInstrBundleIterator< MachineInstr > iterator
Representation of each machine instruction.
unsigned removeBranch(MachineBasicBlock &MBB, int *BytesRemoved=nullptr) const override
bool isSafeToMove(const MachineInstr &MI, const MachineBasicBlock *MBB, const MachineFunction &MF) const override
bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify=false) const override
unsigned insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef< MachineOperand > Cond, const DebugLoc &DL, int *BytesAdded=nullptr) const override
PISAInstrInfo(const PISASubtarget &STI)
bool isNoEmissionInstr(const MachineInstr &MI) const
bool expandPostRAPseudo(MachineInstr &MI) const override
void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, Register DestReg, Register SrcReg, bool KillSrc, bool RenamableDest=false, bool RenamableSrc=false) const override
bool reverseBranchCondition(SmallVectorImpl< MachineOperand > &Cond) const override
bool isFunctionParamInstr(const MachineInstr &MI) const
const PISARegisterInfo & getRegisterInfo() const
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.