1 //===- BPFPassRegistry.def
- Registry of BPF passes
-------------*- C
++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file is used as the registry of passes that are part of the
12 //===----------------------------------------------------------------------===//
14 // NOTE
: NO INCLUDE GUARD DESIRED
!
17 #define
FUNCTION_PASS(NAME
, CREATE_PASS
)
19 FUNCTION_PASS("bpf-aspace-simplify", BPFASpaceCastSimplifyPass())
20 FUNCTION_PASS("bpf-ir-peephole", BPFIRPeepholePass())
23 #ifndef FUNCTION_PASS_WITH_PARAMS
24 #define
FUNCTION_PASS_WITH_PARAMS(NAME
, CLASS
, CREATE_PASS
, PARSER
, PARAMS
)
26 FUNCTION_PASS_WITH_PARAMS(
27 "bpf-preserve-static-offset", "BPFPreserveStaticOffsetPass",
28 [=](bool AllowPartial
) {
29 return
BPFPreserveStaticOffsetPass(AllowPartial
);
31 parseBPFPreserveStaticOffsetOptions
, "allow-partial")
32 #undef FUNCTION_PASS_WITH_PARAMS