LLVM
23.0.0git
include
llvm
Transforms
Vectorize
SandboxVectorizer
Passes
RegionsFromMetadata.h
Go to the documentation of this file.
1
//===- RegionsFromMetadata.h ------------------------------------*- 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
// A SandboxIR function pass that builds regions from IR metadata and then runs
10
// a pipeline of region passes on them. This is useful to test region passes in
11
// isolation without relying on the output of the bottom-up vectorizer.
12
//
13
14
#ifndef LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_REGIONSFROMMETADATA_H
15
#define LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_REGIONSFROMMETADATA_H
16
17
#include "
llvm/ADT/StringRef.h
"
18
#include "
llvm/SandboxIR/Pass.h
"
19
#include "
llvm/SandboxIR/PassManager.h
"
20
21
namespace
llvm::sandboxir
{
22
23
class
LLVM_ABI
RegionsFromMetadata
final :
public
FunctionPass
{
24
// The PM containing the pipeline of region passes.
25
RegionPassManager
RPM;
26
27
public
:
28
RegionsFromMetadata
(
StringRef
Pipeline,
StringRef
AuxArg);
29
bool
runOnFunction
(
Function
&
F
,
const
Analyses
&
A
)
final
;
30
void
printPipeline
(
raw_ostream
&OS)
const
final
{
31
OS <<
getName
() <<
"\n"
;
32
RPM.printPipeline(OS);
33
}
34
};
35
36
}
// namespace llvm::sandboxir
37
38
#endif
// LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_REGIONSFROMMETADATA_H
A
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
LLVM_ABI
#define LLVM_ABI
Definition
Compiler.h:213
runOnFunction
static bool runOnFunction(Function &F, bool PostInlining)
Definition
EntryExitInstrumenter.cpp:109
F
#define F(x, y, z)
Definition
MD5.cpp:54
getName
static StringRef getName(Value *V)
Definition
ProvenanceAnalysisEvaluator.cpp:20
PassManager.h
Pass.h
StringRef.h
llvm::StringRef
Represent a constant reference to a string, i.e.
Definition
StringRef.h:56
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition
raw_ostream.h:53
llvm::sandboxir::Analyses
Definition
Pass.h:26
llvm::sandboxir::FunctionPass::FunctionPass
FunctionPass(StringRef Name)
Name can't contain any spaces or start with '-'.
Definition
Pass.h:78
llvm::sandboxir::Function
Definition
Function.h:19
llvm::sandboxir::RegionPassManager
Definition
PassManager.h:287
llvm::sandboxir::RegionsFromMetadata::printPipeline
void printPipeline(raw_ostream &OS) const final
Similar to print() but adds a newline. Used for testing.
Definition
RegionsFromMetadata.h:30
llvm::sandboxir::RegionsFromMetadata::RegionsFromMetadata
RegionsFromMetadata(StringRef Pipeline, StringRef AuxArg)
Definition
RegionsFromMetadata.cpp:16
llvm::sandboxir
Definition
Argument.h:15
Generated on
for LLVM by
1.14.0