LLVM
17.0.0git
lib
Target
BPF
TargetInfo
BPFTargetInfo.cpp
Go to the documentation of this file.
1
//===-- BPFTargetInfo.cpp - BPF Target Implementation ---------------------===//
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
#include "
TargetInfo/BPFTargetInfo.h
"
10
#include "
llvm/MC/TargetRegistry.h
"
11
12
using namespace
llvm
;
13
14
Target
&
llvm::getTheBPFleTarget
() {
15
static
Target
TheBPFleTarget;
16
return
TheBPFleTarget;
17
}
18
Target
&
llvm::getTheBPFbeTarget
() {
19
static
Target
TheBPFbeTarget;
20
return
TheBPFbeTarget;
21
}
22
Target
&
llvm::getTheBPFTarget
() {
23
static
Target
TheBPFTarget;
24
return
TheBPFTarget;
25
}
26
27
extern
"C"
LLVM_EXTERNAL_VISIBILITY
void
LLVMInitializeBPFTargetInfo
() {
28
TargetRegistry::RegisterTarget
(
getTheBPFTarget
(),
"bpf"
,
"BPF (host endian)"
,
29
"BPF"
, [](
Triple::ArchType
) {
return
false
; },
30
true
);
31
RegisterTarget
<
Triple::bpfel
,
/*HasJIT=*/
true
>
X
(
32
getTheBPFleTarget
(),
"bpfel"
,
"BPF (little endian)"
,
"BPF"
);
33
RegisterTarget
<
Triple::bpfeb
,
/*HasJIT=*/
true
>
Y
(
getTheBPFbeTarget
(),
"bpfeb"
,
34
"BPF (big endian)"
,
"BPF"
);
35
}
llvm::getTheBPFleTarget
Target & getTheBPFleTarget()
Definition:
BPFTargetInfo.cpp:14
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
llvm::Triple::bpfeb
@ bpfeb
Definition:
Triple.h:57
llvm::Target
Target - Wrapper for Target specific information.
Definition:
TargetRegistry.h:149
BPFTargetInfo.h
llvm::Triple::ArchType
ArchType
Definition:
Triple.h:46
Y
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml", "ocaml 3.10-compatible collector")
X
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
LLVM_EXTERNAL_VISIBILITY
#define LLVM_EXTERNAL_VISIBILITY
Definition:
Compiler.h:127
llvm::TargetRegistry::RegisterTarget
static void RegisterTarget(Target &T, const char *Name, const char *ShortDesc, const char *BackendName, Target::ArchMatchFnTy ArchMatchFn, bool HasJIT=false)
RegisterTarget - Register the given target.
Definition:
TargetRegistry.cpp:88
llvm::getTheBPFbeTarget
Target & getTheBPFbeTarget()
Definition:
BPFTargetInfo.cpp:18
llvm::Triple::bpfel
@ bpfel
Definition:
Triple.h:56
llvm::RegisterTarget
RegisterTarget - Helper template for registering a target, for use in the target's initialization fun...
Definition:
TargetRegistry.h:1136
llvm::getTheBPFTarget
Target & getTheBPFTarget()
Definition:
BPFTargetInfo.cpp:22
LLVMInitializeBPFTargetInfo
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeBPFTargetInfo()
Definition:
BPFTargetInfo.cpp:27
TargetRegistry.h
Generated on Sat Jan 28 2023 10:00:09 for LLVM by
1.8.17