Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/CodeGen/MachinePostDominators.cpp
Line
Count
Source (jump to first uncovered line)
1
//===- MachinePostDominators.cpp -Machine Post Dominator Calculation ------===//
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
// This file implements simple dominator construction algorithms for finding
10
// post dominators on machine functions.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#include "llvm/CodeGen/MachinePostDominators.h"
15
16
using namespace llvm;
17
18
namespace llvm {
19
template class DominatorTreeBase<MachineBasicBlock, true>; // PostDomTreeBase
20
}
21
22
char MachinePostDominatorTree::ID = 0;
23
24
//declare initializeMachinePostDominatorTreePass
25
INITIALIZE_PASS(MachinePostDominatorTree, "machinepostdomtree",
26
                "MachinePostDominator Tree Construction", true, true)
27
28
109k
MachinePostDominatorTree::MachinePostDominatorTree() : MachineFunctionPass(ID) {
29
109k
  initializeMachinePostDominatorTreePass(*PassRegistry::getPassRegistry());
30
109k
  DT = new PostDomTreeBase<MachineBasicBlock>();
31
109k
}
32
33
FunctionPass *
34
0
MachinePostDominatorTree::createMachinePostDominatorTreePass() {
35
0
  return new MachinePostDominatorTree();
36
0
}
37
38
bool
39
1.50M
MachinePostDominatorTree::runOnMachineFunction(MachineFunction &F) {
40
1.50M
  DT->recalculate(F);
41
1.50M
  return false;
42
1.50M
}
43
44
109k
MachinePostDominatorTree::~MachinePostDominatorTree() {
45
109k
  delete DT;
46
109k
}
47
48
void
49
104k
MachinePostDominatorTree::getAnalysisUsage(AnalysisUsage &AU) const {
50
104k
  AU.setPreservesAll();
51
104k
  MachineFunctionPass::getAnalysisUsage(AU);
52
104k
}
53
54
void
55
0
MachinePostDominatorTree::print(llvm::raw_ostream &OS, const Module *M) const {
56
0
  DT->print(OS);
57
0
}