LLVM 23.0.0git
BPF.h
Go to the documentation of this file.
1//===-- BPF.h - Top-level interface for BPF representation ------*- 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#ifndef LLVM_LIB_TARGET_BPF_BPF_H
10#define LLVM_LIB_TARGET_BPF_BPF_H
11
14#include "llvm/IR/Analysis.h"
16#include "llvm/IR/PassManager.h"
17#include "llvm/Pass.h"
19
20namespace llvm {
22class BPFSubtarget;
25class PassRegistry;
26
27#define BPF_TRAP "__bpf_trap"
28
30
35
41
43 const BPFSubtarget &,
44 const BPFRegisterBankInfo &);
45
53
55 : public RequiredPassInfoMixin<BPFAbstractMemberAccessPass> {
57
58public:
61};
62
64 : public RequiredPassInfoMixin<BPFPreserveDITypePass> {
65public:
67};
68
69class BPFIRPeepholePass : public RequiredPassInfoMixin<BPFIRPeepholePass> {
70public:
72};
73
75 : public RequiredPassInfoMixin<BPFASpaceCastSimplifyPass> {
76public:
78};
79
80class BPFAdjustOptPass : public OptionalPassInfoMixin<BPFAdjustOptPass> {
81public:
83};
84
86 : public RequiredPassInfoMixin<BPFPreserveStaticOffsetPass> {
87 bool AllowPartial;
88
89public:
90 BPFPreserveStaticOffsetPass(bool AllowPartial) : AllowPartial(AllowPartial) {}
92
93 static std::pair<GetElementPtrInst *, LoadInst *>
95
96 static std::pair<GetElementPtrInst *, StoreInst *>
98};
99
100} // namespace llvm
101
102#endif
This header defines various interfaces for pass management in LLVM.
#define F(x, y, z)
Definition MD5.cpp:54
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
BPFAbstractMemberAccessPass(BPFTargetMachine *TM)
Definition BPF.h:59
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
BPFISelDAGToDAGPass(BPFTargetMachine &TM)
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
static std::pair< GetElementPtrInst *, StoreInst * > reconstructStore(CallInst *Call)
BPFPreserveStaticOffsetPass(bool AllowPartial)
Definition BPF.h:90
static std::pair< GetElementPtrInst *, LoadInst * > reconstructLoad(CallInst *Call)
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
This class represents a function call, abstracting a target machine's calling convention.
FunctionPass class - This class is used to implement most global optimizations.
Definition Pass.h:314
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
Definition Pass.h:255
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:67
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
A set of analyses that are preserved following a run of a transformation pass.
Definition Analysis.h:112
SelectionDAGISelPass(std::unique_ptr< SelectionDAGISel > Selector)
CallInst * Call
Pass manager infrastructure for declaring and invalidating analyses.
This is an optimization pass for GlobalISel generic memory operations.
void initializeBPFMIPreEmitPeepholePass(PassRegistry &)
void initializeBPFMISimplifyPatchablePass(PassRegistry &)
FunctionPass * createBPFMISimplifyPatchablePass()
FunctionPass * createBPFMIPreEmitCheckingPass()
ModulePass * createBPFCheckAndAdjustIR()
FunctionPass * createBPFMIPreEmitPeepholePass()
void initializeBPFMIPeepholePass(PassRegistry &)
FunctionPass * createBPFMIPeepholePass()
void initializeBPFAsmPrinterPass(PassRegistry &)
void initializeBPFCheckAndAdjustIRPass(PassRegistry &)
void initializeBPFMIPreEmitCheckingPass(PassRegistry &)
FunctionPass * createBPFISelDag(BPFTargetMachine &TM)
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
InstructionSelector * createBPFInstructionSelector(const BPFTargetMachine &, const BPFSubtarget &, const BPFRegisterBankInfo &)
void initializeBPFDAGToDAGISelLegacyPass(PassRegistry &)
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
Definition MIRParser.h:39
A CRTP mix-in for passes that can be skipped.
A CRTP mix-in for passes that should not be skipped.