Coverage Report

Created: 2019-02-21 13:17

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/CodeGen/MachineDominanceFrontier.h
Line
Count
Source (jump to first uncovered line)
1
//===- llvm/CodeGen/MachineDominanceFrontier.h ------------------*- C++ -*-===//
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
#ifndef LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H
10
#define LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H
11
12
#include "llvm/Analysis/DominanceFrontier.h"
13
#include "llvm/Analysis/DominanceFrontierImpl.h"
14
#include "llvm/CodeGen/MachineBasicBlock.h"
15
#include "llvm/CodeGen/MachineFunctionPass.h"
16
#include "llvm/Support/GenericDomTree.h"
17
#include <vector>
18
19
namespace llvm {
20
21
class MachineDominanceFrontier : public MachineFunctionPass {
22
  ForwardDominanceFrontierBase<MachineBasicBlock> Base;
23
24
public:
25
 using DomTreeT = DomTreeBase<MachineBasicBlock>;
26
 using DomTreeNodeT = DomTreeNodeBase<MachineBasicBlock>;
27
 using DomSetType = DominanceFrontierBase<MachineBasicBlock, false>::DomSetType;
28
 using iterator = DominanceFrontierBase<MachineBasicBlock, false>::iterator;
29
 using const_iterator =
30
     DominanceFrontierBase<MachineBasicBlock, false>::const_iterator;
31
32
 MachineDominanceFrontier(const MachineDominanceFrontier &) = delete;
33
 MachineDominanceFrontier &operator=(const MachineDominanceFrontier &) = delete;
34
35
 static char ID;
36
37
 MachineDominanceFrontier();
38
39
 ForwardDominanceFrontierBase<MachineBasicBlock> &getBase() { return Base; }
40
41
0
 const SmallVectorImpl<MachineBasicBlock *> &getRoots() const {
42
0
   return Base.getRoots();
43
0
  }
44
45
0
  MachineBasicBlock *getRoot() const {
46
0
    return Base.getRoot();
47
0
  }
48
49
0
  bool isPostDominator() const {
50
0
    return Base.isPostDominator();
51
0
  }
52
53
0
  iterator begin() {
54
0
    return Base.begin();
55
0
  }
56
57
0
  const_iterator begin() const {
58
0
    return Base.begin();
59
0
  }
60
61
0
  iterator end() {
62
0
    return Base.end();
63
0
  }
64
65
21.6k
  const_iterator end() const {
66
21.6k
    return Base.end();
67
21.6k
  }
68
69
0
  iterator find(MachineBasicBlock *B) {
70
0
    return Base.find(B);
71
0
  }
72
73
21.6k
  const_iterator find(MachineBasicBlock *B) const {
74
21.6k
    return Base.find(B);
75
21.6k
  }
76
77
0
  iterator addBasicBlock(MachineBasicBlock *BB, const DomSetType &frontier) {
78
0
    return Base.addBasicBlock(BB, frontier);
79
0
  }
80
81
0
  void removeBlock(MachineBasicBlock *BB) {
82
0
    return Base.removeBlock(BB);
83
0
  }
84
85
0
  void addToFrontier(iterator I, MachineBasicBlock *Node) {
86
0
    return Base.addToFrontier(I, Node);
87
0
  }
88
89
0
  void removeFromFrontier(iterator I, MachineBasicBlock *Node) {
90
0
    return Base.removeFromFrontier(I, Node);
91
0
  }
92
93
0
  bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const {
94
0
    return Base.compareDomSet(DS1, DS2);
95
0
  }
96
97
0
  bool compare(DominanceFrontierBase<MachineBasicBlock, false> &Other) const {
98
0
    return Base.compare(Other);
99
0
  }
100
101
  bool runOnMachineFunction(MachineFunction &F) override;
102
103
  void releaseMemory() override;
104
105
  void getAnalysisUsage(AnalysisUsage &AU) const override;
106
};
107
108
} // end namespace llvm
109
110
#endif // LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H