LLVM 20.0.0git
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
11
12using namespace llvm;
13
15 static Target TheBPFleTarget;
16 return TheBPFleTarget;
17}
19 static Target TheBPFbeTarget;
20 return TheBPFbeTarget;
21}
23 static Target TheBPFTarget;
24 return TheBPFTarget;
25}
26
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_EXTERNAL_VISIBILITY void LLVMInitializeBPFTargetInfo()
#define LLVM_EXTERNAL_VISIBILITY
Definition: Compiler.h:128
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml", "ocaml 3.10-compatible collector")
Target - Wrapper for Target specific information.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Target & getTheBPFleTarget()
Target & getTheBPFbeTarget()
Target & getTheBPFTarget()
RegisterTarget - Helper template for registering a target, for use in the target's initialization fun...
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.