[ARM] Rejig MVE load store tests. NFC
[llvm-core.git] / lib / CodeGen / MachineDominanceFrontier.cpp
blob6704298c17d6ef354052e0299ecf9eaf9a437a71
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"
14 using namespace llvm;
16 namespace llvm {
17 template class DominanceFrontierBase<MachineBasicBlock, false>;
18 template class DominanceFrontierBase<MachineBasicBlock, true>;
19 template class ForwardDominanceFrontierBase<MachineBasicBlock>;
23 char MachineDominanceFrontier::ID = 0;
25 INITIALIZE_PASS_BEGIN(MachineDominanceFrontier, "machine-domfrontier",
26 "Machine Dominance Frontier Construction", true, true)
27 INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
28 INITIALIZE_PASS_END(MachineDominanceFrontier, "machine-domfrontier",
29 "Machine Dominance Frontier Construction", true, true)
31 MachineDominanceFrontier::MachineDominanceFrontier()
32 : MachineFunctionPass(ID),
33 Base() {
34 initializeMachineDominanceFrontierPass(*PassRegistry::getPassRegistry());
37 char &llvm::MachineDominanceFrontierID = MachineDominanceFrontier::ID;
39 bool MachineDominanceFrontier::runOnMachineFunction(MachineFunction &) {
40 releaseMemory();
41 Base.analyze(getAnalysis<MachineDominatorTree>().getBase());
42 return false;
45 void MachineDominanceFrontier::releaseMemory() {
46 Base.releaseMemory();
49 void MachineDominanceFrontier::getAnalysisUsage(AnalysisUsage &AU) const {
50 AU.setPreservesAll();
51 AU.addRequired<MachineDominatorTree>();
52 MachineFunctionPass::getAnalysisUsage(AU);