LLVM
24.0.0git
lib
SandboxIR
PassManager.cpp
Go to the documentation of this file.
1
//===- PassManager.cpp - Runs a pipeline of Sandbox IR passes -------------===//
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
#include "
llvm/SandboxIR/PassManager.h
"
10
11
namespace
llvm::sandboxir
{
12
13
bool
FunctionPassManager::runOnFunction(
Function
&
F
,
const
Analyses
&
A
) {
14
bool
Change =
false
;
15
for
(
auto
&
Pass
:
Passes
) {
16
Change |=
Pass
->runOnFunction(
F
,
A
);
17
// TODO: run the verifier.
18
}
19
// TODO: Check ChangeAll against hashes before/after.
20
return
Change;
21
}
22
23
bool
RegionPassManager::runOnRegion
(
Region
&R,
const
Analyses
&
A
) {
24
bool
Change =
false
;
25
for
(
auto
&
Pass
:
Passes
) {
26
Change |=
Pass
->runOnRegion(R,
A
);
27
// TODO: run the verifier.
28
}
29
// TODO: Check ChangeAll against hashes before/after.
30
return
Change;
31
}
32
33
}
// namespace llvm::sandboxir
A
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
F
#define F(x, y, z)
Definition
MD5.cpp:54
PassManager.h
llvm::sandboxir::Analyses
Definition
Pass.h:27
llvm::sandboxir::Function
Definition
Function.h:19
llvm::sandboxir::PassManager< FunctionPass, FunctionPass >::Passes
SmallVector< std::unique_ptr< FunctionPass > > Passes
Definition
PassManager.h:43
llvm::sandboxir::Pass
The base class of a Sandbox IR Pass.
Definition
Pass.h:47
llvm::sandboxir::RegionPassManager::runOnRegion
bool runOnRegion(Region &R, const Analyses &A) final
\Returns true if it modifies R.
Definition
PassManager.cpp:23
llvm::sandboxir::Region
Definition
Region.h:66
llvm::sandboxir
Definition
Argument.h:15
Generated on
for LLVM by
1.14.0