LLVM  13.0.0git
BPFCORE.h
Go to the documentation of this file.
1 //===- BPFCORE.h - Common info for Compile-Once Run-EveryWhere -*- 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_BPFCORE_H
10 #define LLVM_LIB_TARGET_BPF_BPFCORE_H
11 
12 #include "llvm/ADT/StringRef.h"
13 
14 namespace llvm {
15 
16 class BasicBlock;
17 class Instruction;
18 class Module;
19 
21 public:
35 
37  };
38 
42 
44  };
45 
49 
51  };
52 
56 
58  };
59 
60  /// The attribute attached to globals representing a field access
61  static constexpr StringRef AmaAttr = "btf_ama";
62  /// The attribute attached to globals representing a type id
63  static constexpr StringRef TypeIdAttr = "btf_type_id";
64 
65  /// llvm.bpf.passthrough builtin seq number
66  static uint32_t SeqNum;
67 
68  /// Insert a bpf passthrough builtin function.
70  Instruction *Input,
71  Instruction *Before);
72 };
73 
74 } // namespace llvm
75 
76 #endif
llvm::BPFCoreSharedInfo::MAX_PRESERVE_ENUM_VALUE_FLAG
@ MAX_PRESERVE_ENUM_VALUE_FLAG
Definition: BPFCORE.h:57
llvm
Definition: AllocatorList.h:23
llvm::BPFCoreSharedInfo::PRESERVE_ENUM_VALUE
@ PRESERVE_ENUM_VALUE
Definition: BPFCORE.h:55
llvm::BPFCoreSharedInfo::PRESERVE_TYPE_INFO_SIZE
@ PRESERVE_TYPE_INFO_SIZE
Definition: BPFCORE.h:48
StringRef.h
llvm::BPFCoreSharedInfo::BTFTypeIdFlag
BTFTypeIdFlag
Definition: BPFCORE.h:39
llvm::BPFCoreSharedInfo::BTF_TYPE_ID_LOCAL
@ BTF_TYPE_ID_LOCAL
Definition: BPFCORE.h:29
llvm::BPFCoreSharedInfo::SeqNum
static uint32_t SeqNum
llvm.bpf.passthrough builtin seq number
Definition: BPFCORE.h:66
llvm::BPFCoreSharedInfo::TYPE_EXISTENCE
@ TYPE_EXISTENCE
Definition: BPFCORE.h:31
llvm::BPFCoreSharedInfo::FIELD_RSHIFT_U64
@ FIELD_RSHIFT_U64
Definition: BPFCORE.h:28
llvm::BasicBlock
LLVM Basic Block Representation.
Definition: BasicBlock.h:58
llvm::BPFCoreSharedInfo::MAX_PRESERVE_TYPE_INFO_FLAG
@ MAX_PRESERVE_TYPE_INFO_FLAG
Definition: BPFCORE.h:50
llvm::BPFCoreSharedInfo::FIELD_EXISTENCE
@ FIELD_EXISTENCE
Definition: BPFCORE.h:25
llvm::BPFCoreSharedInfo::FIELD_SIGNEDNESS
@ FIELD_SIGNEDNESS
Definition: BPFCORE.h:26
llvm::Instruction
Definition: Instruction.h:45
llvm::BPFCoreSharedInfo::PreserveTypeInfo
PreserveTypeInfo
Definition: BPFCORE.h:46
llvm::BPFCoreSharedInfo::BTF_TYPE_ID_REMOTE
@ BTF_TYPE_ID_REMOTE
Definition: BPFCORE.h:30
llvm::BPFCoreSharedInfo::MAX_FIELD_RELOC_KIND
@ MAX_FIELD_RELOC_KIND
Definition: BPFCORE.h:36
llvm::BPFCoreSharedInfo::ENUM_VALUE
@ ENUM_VALUE
Definition: BPFCORE.h:34
llvm::BPFCoreSharedInfo::FIELD_BYTE_OFFSET
@ FIELD_BYTE_OFFSET
Definition: BPFCORE.h:23
llvm::BPFCoreSharedInfo::insertPassThrough
static Instruction * insertPassThrough(Module *M, BasicBlock *BB, Instruction *Input, Instruction *Before)
Insert a bpf passthrough builtin function.
Definition: BPFAbstractMemberAccess.cpp:100
llvm::BPFCoreSharedInfo::MAX_BTF_TYPE_ID_FLAG
@ MAX_BTF_TYPE_ID_FLAG
Definition: BPFCORE.h:43
llvm::BPFCoreSharedInfo::PRESERVE_TYPE_INFO_EXISTENCE
@ PRESERVE_TYPE_INFO_EXISTENCE
Definition: BPFCORE.h:47
llvm::BPFCoreSharedInfo::PatchableRelocKind
PatchableRelocKind
Definition: BPFCORE.h:22
llvm::BPFCoreSharedInfo::TypeIdAttr
static constexpr StringRef TypeIdAttr
The attribute attached to globals representing a type id.
Definition: BPFCORE.h:63
llvm::BPFCoreSharedInfo::PreserveEnumValue
PreserveEnumValue
Definition: BPFCORE.h:53
llvm::ISD::BasicBlock
@ BasicBlock
Various leaf nodes.
Definition: ISDOpcodes.h:64
llvm::BPFCoreSharedInfo::TYPE_SIZE
@ TYPE_SIZE
Definition: BPFCORE.h:32
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:67
llvm::BPFCoreSharedInfo::FIELD_BYTE_SIZE
@ FIELD_BYTE_SIZE
Definition: BPFCORE.h:24
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:57
uint32_t
Module
Machine Check Debug Module
Definition: MachineCheckDebugify.cpp:122
llvm::BPFCoreSharedInfo::PRESERVE_ENUM_VALUE_EXISTENCE
@ PRESERVE_ENUM_VALUE_EXISTENCE
Definition: BPFCORE.h:54
llvm::BPFCoreSharedInfo::ENUM_VALUE_EXISTENCE
@ ENUM_VALUE_EXISTENCE
Definition: BPFCORE.h:33
llvm::BPFCoreSharedInfo::AmaAttr
static constexpr StringRef AmaAttr
The attribute attached to globals representing a field access.
Definition: BPFCORE.h:61
llvm::BPFCoreSharedInfo::BTF_TYPE_ID_REMOTE_RELOC
@ BTF_TYPE_ID_REMOTE_RELOC
Definition: BPFCORE.h:41
llvm::BPFCoreSharedInfo::FIELD_LSHIFT_U64
@ FIELD_LSHIFT_U64
Definition: BPFCORE.h:27
BB
Common register allocation spilling lr str ldr sxth r3 ldr mla r4 can lr mov lr str ldr sxth r3 mla r4 and then merge mul and lr str ldr sxth r3 mla r4 It also increase the likelihood the store may become dead bb27 Successors according to LLVM BB
Definition: README.txt:39
llvm::BPFCoreSharedInfo
Definition: BPFCORE.h:20
llvm::BPFCoreSharedInfo::BTF_TYPE_ID_LOCAL_RELOC
@ BTF_TYPE_ID_LOCAL_RELOC
Definition: BPFCORE.h:40