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
31
33 const BPFSubtarget &,
34 const BPFRegisterBankInfo &);
35
41
43 : public PassInfoMixin<BPFAbstractMemberAccessPass> {
45
46public:
49
50 static bool isRequired() { return true; }
51};
52
53class BPFPreserveDITypePass : public PassInfoMixin<BPFPreserveDITypePass> {
54public:
56
57 static bool isRequired() { return true; }
58};
59
60class BPFIRPeepholePass : public PassInfoMixin<BPFIRPeepholePass> {
61public:
63
64 static bool isRequired() { return true; }
65};
66
68 : public PassInfoMixin<BPFASpaceCastSimplifyPass> {
69public:
71
72 static bool isRequired() { return true; }
73};
74
75class BPFAdjustOptPass : public PassInfoMixin<BPFAdjustOptPass> {
76public:
78};
79
81 : public PassInfoMixin<BPFPreserveStaticOffsetPass> {
82 bool AllowPartial;
83
84public:
85 BPFPreserveStaticOffsetPass(bool AllowPartial) : AllowPartial(AllowPartial) {}
87
88 static bool isRequired() { return true; }
89
90 static std::pair<GetElementPtrInst *, LoadInst *>
92
93 static std::pair<GetElementPtrInst *, StoreInst *>
95};
96
97} // namespace llvm
98
99#endif
#define F(x, y, z)
Definition: MD5.cpp:55
const char LLVMTargetMachineRef TM
This header defines various interfaces for pass management in LLVM.
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:253
static bool isRequired()
Definition: BPF.h:72
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
static bool isRequired()
Definition: BPF.h:50
BPFAbstractMemberAccessPass(BPFTargetMachine *TM)
Definition: BPF.h:47
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
static bool isRequired()
Definition: BPF.h:64
static bool isRequired()
Definition: BPF.h:57
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
static bool isRequired()
Definition: BPF.h:88
static std::pair< GetElementPtrInst *, StoreInst * > reconstructStore(CallInst *Call)
BPFPreserveStaticOffsetPass(bool AllowPartial)
Definition: BPF.h:85
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()
ModulePass * createBPFCheckAndAdjustIR()
FunctionPass * createBPFMIPreEmitPeepholePass()
void initializeBPFMIPeepholePass(PassRegistry &)
FunctionPass * createBPFMIPeepholePass()
void initializeBPFCheckAndAdjustIRPass(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