LLVM 19.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
69class BPFAdjustOptPass : public PassInfoMixin<BPFAdjustOptPass> {
70public:
72};
73
75 : public PassInfoMixin<BPFPreserveStaticOffsetPass> {
76 bool AllowPartial;
77
78public:
79 BPFPreserveStaticOffsetPass(bool AllowPartial) : AllowPartial(AllowPartial) {}
81
82 static bool isRequired() { return true; }
83
84 static std::pair<GetElementPtrInst *, LoadInst *>
86
87 static std::pair<GetElementPtrInst *, StoreInst *>
89};
90
91} // namespace llvm
92
93#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:348
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:82
static std::pair< GetElementPtrInst *, StoreInst * > reconstructStore(CallInst *Call)
BPFPreserveStaticOffsetPass(bool AllowPartial)
Definition: BPF.h:79
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:311
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:109
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 initializeBPFDAGToDAGISelPass(PassRegistry &)
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:91