[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / lib / CodeGen / MachineDominanceFrontier.cpp
blob6ddb1758719b3a38a5fb03413fe0720e62e5e39e
1 //===- MachineDominanceFrontier.cpp ---------------------------------------===//
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 //===----------------------------------------------------------------------===//
9 #include "llvm/CodeGen/MachineDominanceFrontier.h"
10 #include "llvm/Analysis/DominanceFrontierImpl.h"
11 #include "llvm/CodeGen/MachineDominators.h"
12 #include "llvm/CodeGen/Passes.h"
13 #include "llvm/InitializePasses.h"
15 using namespace llvm;
17 namespace llvm {
18 template class DominanceFrontierBase<MachineBasicBlock, false>;
19 template class DominanceFrontierBase<MachineBasicBlock, true>;
20 template class ForwardDominanceFrontierBase<MachineBasicBlock>;
24 char MachineDominanceFrontier::ID = 0;
26 INITIALIZE_PASS_BEGIN(MachineDominanceFrontier, "machine-domfrontier",
27 "Machine Dominance Frontier Construction", true, true)
28 INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
29 INITIALIZE_PASS_END(MachineDominanceFrontier, "machine-domfrontier",
30 "Machine Dominance Frontier Construction", true, true)
32 MachineDominanceFrontier::MachineDominanceFrontier()
33 : MachineFunctionPass(ID),
34 Base() {
35 initializeMachineDominanceFrontierPass(*PassRegistry::getPassRegistry());
38 char &llvm::MachineDominanceFrontierID = MachineDominanceFrontier::ID;
40 bool MachineDominanceFrontier::runOnMachineFunction(MachineFunction &) {
41 releaseMemory();
42 Base.analyze(getAnalysis<MachineDominatorTree>().getBase());
43 return false;
46 void MachineDominanceFrontier::releaseMemory() {
47 Base.releaseMemory();
50 void MachineDominanceFrontier::getAnalysisUsage(AnalysisUsage &AU) const {
51 AU.setPreservesAll();
52 AU.addRequired<MachineDominatorTree>();
53 MachineFunctionPass::getAnalysisUsage(AU);