LLVM 20.0.0git
SandboxVectorizerPassBuilder.cpp
Go to the documentation of this file.
2
7
8namespace llvm::sandboxir {
9
10std::unique_ptr<sandboxir::RegionPass>
12#define REGION_PASS(NAME, CLASS_NAME) \
13 if (Name == NAME) { \
14 assert(Args.empty() && "Unexpected arguments for pass '" NAME "'."); \
15 return std::make_unique<CLASS_NAME>(); \
16 }
17// TODO: Support region passes with params.
18#include "Passes/PassRegistry.def"
19 return nullptr;
20}
21
22std::unique_ptr<sandboxir::FunctionPass>
24 StringRef Args) {
25#define FUNCTION_PASS_WITH_PARAMS(NAME, CLASS_NAME) \
26 if (Name == NAME) \
27 return std::make_unique<CLASS_NAME>(Args);
28#include "Passes/PassRegistry.def"
29 return nullptr;
30}
31
32} // namespace llvm::sandboxir
std::string Name
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:51
static std::unique_ptr< RegionPass > createRegionPass(StringRef Name, StringRef Args)
static std::unique_ptr< FunctionPass > createFunctionPass(StringRef Name, StringRef Args)