Path: blob/main/contrib/llvm-project/llvm/lib/Target/BPF/BPFInstrInfo.h
35269 views
//===-- BPFInstrInfo.h - BPF Instruction Information ------------*- 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// This file contains the BPF implementation of the TargetInstrInfo class.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_BPF_BPFINSTRINFO_H13#define LLVM_LIB_TARGET_BPF_BPFINSTRINFO_H1415#include "BPFRegisterInfo.h"16#include "llvm/CodeGen/TargetInstrInfo.h"1718#define GET_INSTRINFO_HEADER19#include "BPFGenInstrInfo.inc"2021namespace llvm {2223class BPFInstrInfo : public BPFGenInstrInfo {24const BPFRegisterInfo RI;2526public:27BPFInstrInfo();2829const BPFRegisterInfo &getRegisterInfo() const { return RI; }3031void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,32const DebugLoc &DL, MCRegister DestReg, MCRegister SrcReg,33bool KillSrc) const override;3435bool expandPostRAPseudo(MachineInstr &MI) const override;3637void storeRegToStackSlot(MachineBasicBlock &MBB,38MachineBasicBlock::iterator MBBI, Register SrcReg,39bool isKill, int FrameIndex,40const TargetRegisterClass *RC,41const TargetRegisterInfo *TRI,42Register VReg) const override;4344void loadRegFromStackSlot(MachineBasicBlock &MBB,45MachineBasicBlock::iterator MBBI, Register DestReg,46int FrameIndex, const TargetRegisterClass *RC,47const TargetRegisterInfo *TRI,48Register VReg) const override;49bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,50MachineBasicBlock *&FBB,51SmallVectorImpl<MachineOperand> &Cond,52bool AllowModify) const override;5354unsigned removeBranch(MachineBasicBlock &MBB,55int *BytesRemoved = nullptr) const override;56unsigned insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,57MachineBasicBlock *FBB, ArrayRef<MachineOperand> Cond,58const DebugLoc &DL,59int *BytesAdded = nullptr) const override;60private:61void expandMEMCPY(MachineBasicBlock::iterator) const;6263};64}6566#endif676869