[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / lib / Target / BPF / BPF.h
bloba98a3e08d5de7e516f84f95aa5f3613966d4c279
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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIB_TARGET_BPF_BPF_H
10 #define LLVM_LIB_TARGET_BPF_BPF_H
12 #include "MCTargetDesc/BPFMCTargetDesc.h"
13 #include "llvm/IR/PassManager.h"
14 #include "llvm/Target/TargetMachine.h"
16 namespace llvm {
17 class BPFTargetMachine;
19 ModulePass *createBPFAdjustOpt();
20 ModulePass *createBPFCheckAndAdjustIR();
22 FunctionPass *createBPFAbstractMemberAccess(BPFTargetMachine *TM);
23 FunctionPass *createBPFPreserveDIType();
24 FunctionPass *createBPFISelDag(BPFTargetMachine &TM);
25 FunctionPass *createBPFMISimplifyPatchablePass();
26 FunctionPass *createBPFMIPeepholePass();
27 FunctionPass *createBPFMIPeepholeTruncElimPass();
28 FunctionPass *createBPFMIPreEmitPeepholePass();
29 FunctionPass *createBPFMIPreEmitCheckingPass();
31 void initializeBPFAdjustOptPass(PassRegistry&);
32 void initializeBPFCheckAndAdjustIRPass(PassRegistry&);
34 void initializeBPFAbstractMemberAccessLegacyPassPass(PassRegistry &);
35 void initializeBPFPreserveDITypePass(PassRegistry&);
36 void initializeBPFMISimplifyPatchablePass(PassRegistry&);
37 void initializeBPFMIPeepholePass(PassRegistry&);
38 void initializeBPFMIPeepholeTruncElimPass(PassRegistry&);
39 void initializeBPFMIPreEmitPeepholePass(PassRegistry&);
40 void initializeBPFMIPreEmitCheckingPass(PassRegistry&);
42 class BPFAbstractMemberAccessPass
43 : public PassInfoMixin<BPFAbstractMemberAccessPass> {
44 BPFTargetMachine *TM;
46 public:
47 BPFAbstractMemberAccessPass(BPFTargetMachine *TM) : TM(TM) {}
48 PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
50 static bool isRequired() { return true; }
53 class BPFPreserveDITypePass : public PassInfoMixin<BPFPreserveDITypePass> {
54 public:
55 PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
57 static bool isRequired() { return true; }
60 class BPFAdjustOptPass : public PassInfoMixin<BPFAdjustOptPass> {
61 public:
62 PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
64 } // namespace llvm
66 #endif