Coverage Report

Created: 2024-11-21 17:23

/home/runner/work/DirectXShaderCompiler/DirectXShaderCompiler/lib/Analysis/DominanceFrontier.cpp
Line
Count
Source (jump to first uncovered line)
1
//===- DominanceFrontier.cpp - Dominance Frontier Calculation -------------===//
2
//
3
//                     The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
10
#include "llvm/Analysis/DominanceFrontier.h"
11
#include "llvm/Analysis/DominanceFrontierImpl.h"
12
13
using namespace llvm;
14
15
namespace llvm {
16
template class DominanceFrontierBase<BasicBlock>;
17
template class ForwardDominanceFrontierBase<BasicBlock>;
18
}
19
20
char DominanceFrontier::ID = 0;
21
22
184
INITIALIZE_PASS_BEGIN(DominanceFrontier, "domfrontier",
23
184
                "Dominance Frontier Construction", true, true)
24
184
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
25
184
INITIALIZE_PASS_END(DominanceFrontier, "domfrontier",
26
                "Dominance Frontier Construction", true, true)
27
28
DominanceFrontier::DominanceFrontier()
29
  : FunctionPass(ID),
30
0
    Base() {
31
0
  initializeDominanceFrontierPass(*PassRegistry::getPassRegistry());
32
0
}
33
34
0
void DominanceFrontier::releaseMemory() {
35
0
  Base.releaseMemory();
36
0
}
37
38
0
bool DominanceFrontier::runOnFunction(Function &) {
39
0
  releaseMemory();
40
0
  Base.analyze(getAnalysis<DominatorTreeWrapperPass>().getDomTree());
41
0
  return false;
42
0
}
43
44
0
void DominanceFrontier::getAnalysisUsage(AnalysisUsage &AU) const {
45
0
  AU.setPreservesAll();
46
0
  AU.addRequired<DominatorTreeWrapperPass>();
47
0
}
48
49
0
void DominanceFrontier::print(raw_ostream &OS, const Module *) const {
50
0
  Base.print(OS);
51
0
}
52
53
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
54
void DominanceFrontier::dump() const {
55
  print(dbgs());
56
}
57
#endif