LLVM
23.0.0git
include
llvm
Transforms
Vectorize
SandboxVectorizer
Passes
SeedCollection.h
Go to the documentation of this file.
1
//===- SeedCollection.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
// The seed-collection pass of the bottom-up vectorizer.
10
//
11
12
#ifndef LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_SEEDCOLLECTION_H
13
#define LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_SEEDCOLLECTION_H
14
15
#include "
llvm/SandboxIR/Pass.h
"
16
#include "
llvm/SandboxIR/PassManager.h
"
17
18
namespace
llvm::sandboxir
{
19
20
/// This pass collects the instructions that can become vectorization "seeds",
21
/// like stores to consecutive memory addresses. It then goes over the collected
22
/// seeds, slicing them into appropriately sized chunks, creating a Region with
23
/// the seed slice as the Auxiliary vector and runs the region pass pipeline.
24
class
LLVM_ABI
SeedCollection
final :
public
FunctionPass
{
25
26
/// The PM containing the pipeline of region passes.
27
RegionPassManager
RPM;
28
/// The auxiliary argument passed to the pass that tells us that we should
29
/// collect seeds of different types.
30
static
constexpr
StringRef
DiffTypesArgStr =
"enable-diff-types"
;
31
/// Collect seeds of different types.
32
bool
AllowDiffTypes =
false
;
33
34
public
:
35
SeedCollection
(
StringRef
Pipeline,
StringRef
AuxArg);
36
bool
runOnFunction
(
Function
&
F
,
const
Analyses
&
A
)
final
;
37
void
printPipeline
(
raw_ostream
&OS)
const
final
{
38
OS <<
getName
() <<
"\n"
;
39
RPM.printPipeline(OS);
40
}
41
};
42
43
}
// namespace llvm::sandboxir
44
45
#endif
// LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_SEEDCOLLECTION_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
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::SeedCollection::printPipeline
void printPipeline(raw_ostream &OS) const final
Similar to print() but adds a newline. Used for testing.
Definition
SeedCollection.h:37
llvm::sandboxir::SeedCollection::SeedCollection
SeedCollection(StringRef Pipeline, StringRef AuxArg)
Definition
SeedCollection.cpp:36
llvm::sandboxir
Definition
Argument.h:15
Generated on
for LLVM by
1.14.0