LLVM 20.0.0git
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
10
11namespace llvm::sandboxir {
12
13bool 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
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
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
#define F(x, y, z)
Definition: MD5.cpp:55
SmallVector< std::unique_ptr< FunctionPass > > Passes
The list of passes that this pass manager will run.
Definition: PassManager.h:42
The base class of a Sandbox IR Pass.
Definition: Pass.h:42
bool runOnRegion(Region &R, const Analyses &A) final
\Returns true if it modifies R.
Definition: PassManager.cpp:23
The main job of the Region is to point to new instructions generated by vectorization passes.
Definition: Region.h:54