LLVM 20.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/PassManager.h"
15#include "llvm/Pass.h"
17
18namespace llvm {
19class BPFRegisterBankInfo;
20class BPFSubtarget;
21class BPFTargetMachine;
22class InstructionSelector;
23class PassRegistry;
24
26
32
34 const BPFSubtarget &,
35 const BPFRegisterBankInfo &);
36
43
45 : public PassInfoMixin<BPFAbstractMemberAccessPass> {
47
48public:
51
52 static bool isRequired() { return true; }
53};
54
55class BPFPreserveDITypePass : public PassInfoMixin<BPFPreserveDITypePass> {
56public:
58
59 static bool isRequired() { return true; }
60};
61
62class BPFIRPeepholePass : public PassInfoMixin<BPFIRPeepholePass> {
63public:
65
66 static bool isRequired() { return true; }
67};
68
70 : public PassInfoMixin<BPFASpaceCastSimplifyPass> {
71public:
73
74 static bool isRequired() { return true; }
75};
76
77class BPFAdjustOptPass : public PassInfoMixin<BPFAdjustOptPass> {
78public:
80};
81
83 : public PassInfoMixin<BPFPreserveStaticOffsetPass> {
84 bool AllowPartial;
85
86public:
87 BPFPreserveStaticOffsetPass(bool AllowPartial) : AllowPartial(AllowPartial) {}
89
90 static bool isRequired() { return true; }
91
92 static std::pair<GetElementPtrInst *, LoadInst *>
94
95 static std::pair<GetElementPtrInst *, StoreInst *>
97};
98
99} // namespace llvm
100
101#endif
This header defines various interfaces for pass management in LLVM.
#define F(x, y, z)
Definition: MD5.cpp:55
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:253
static bool isRequired()
Definition: BPF.h:74
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
static bool isRequired()
Definition: BPF.h:52
BPFAbstractMemberAccessPass(BPFTargetMachine *TM)
Definition: BPF.h:49
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
static bool isRequired()
Definition: BPF.h:66
static bool isRequired()
Definition: BPF.h:59
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
static bool isRequired()
Definition: BPF.h:90
static std::pair< GetElementPtrInst *, StoreInst * > reconstructStore(CallInst *Call)
BPFPreserveStaticOffsetPass(bool AllowPartial)
Definition: BPF.h:87
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:310
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
Definition: Pass.h:251
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
Definition: PassRegistry.h:37
A set of analyses that are preserved following a run of a transformation pass.
Definition: Analysis.h:111
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
void initializeBPFMIPreEmitPeepholePass(PassRegistry &)
void initializeBPFMISimplifyPatchablePass(PassRegistry &)
FunctionPass * createBPFMISimplifyPatchablePass()
FunctionPass * createBPFMIPreEmitCheckingPass()
ModulePass * createBPFCheckAndAdjustIR()
FunctionPass * createBPFMIPreEmitPeepholePass()
void initializeBPFMIPeepholePass(PassRegistry &)
FunctionPass * createBPFMIPeepholePass()
void initializeBPFCheckAndAdjustIRPass(PassRegistry &)
void initializeBPFMIPreEmitCheckingPass(PassRegistry &)
FunctionPass * createBPFISelDag(BPFTargetMachine &TM)
InstructionSelector * createBPFInstructionSelector(const BPFTargetMachine &, const BPFSubtarget &, const BPFRegisterBankInfo &)
void initializeBPFDAGToDAGISelLegacyPass(PassRegistry &)
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:69