LLVM
23.0.0git
include
llvm
Transforms
Vectorize
SandboxVectorizer
Passes
PackReuse.h
Go to the documentation of this file.
1
//===- PackReuse.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 pack de-duplication pass.
10
//
11
12
#ifndef LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_PACKREUSE_H
13
#define LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_PACKREUSE_H
14
15
#include "
llvm/ADT/StringRef.h
"
16
#include "
llvm/SandboxIR/Pass.h
"
17
#include "
llvm/SandboxIR/Region.h
"
18
19
namespace
llvm::sandboxir
{
20
21
/// This pass aims at de-duplicating packs, i.e., try to reuse already existing
22
/// pack patterns instead of keeping both.
23
/// This is useful because even though the duplicates will most probably be
24
/// optimized away by future passes, their added cost can make vectorization
25
/// more conservative than it should be.
26
class
PackReuse
final :
public
RegionPass
{
27
bool
Change =
false
;
28
29
public
:
30
PackReuse
() :
RegionPass
(
"pack-reuse"
) {}
31
bool
runOnRegion
(
Region
&Rgn,
const
Analyses
&
A
)
final
;
32
};
33
34
}
// namespace llvm::sandboxir
35
36
#endif
// LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_PACKREUSE_H
A
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
Region.h
Pass.h
StringRef.h
llvm::sandboxir::Analyses
Definition
Pass.h:26
llvm::sandboxir::PackReuse::runOnRegion
bool runOnRegion(Region &Rgn, const Analyses &A) final
\Returns true if it modifies R.
Definition
PackReuse.cpp:14
llvm::sandboxir::PackReuse::PackReuse
PackReuse()
Definition
PackReuse.h:30
llvm::sandboxir::RegionPass::RegionPass
RegionPass(StringRef Name)
Name can't contain any spaces or start with '-'.
Definition
Pass.h:87
llvm::sandboxir::Region
Definition
Region.h:66
llvm::sandboxir
Definition
Argument.h:15
Generated on
for LLVM by
1.14.0