Coverage Report

Created: 2018-11-16 02:38

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