Coverage Report

Created: 2018-11-16 02:38

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/CodeGen/MachinePostDominators.h
Line
Count
Source (jump to first uncovered line)
1
//=- llvm/CodeGen/MachineDominators.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
// This file exposes interfaces to post dominance information for
11
// target-specific code.
12
//
13
//===----------------------------------------------------------------------===//
14
15
#ifndef LLVM_CODEGEN_MACHINEPOSTDOMINATORS_H
16
#define LLVM_CODEGEN_MACHINEPOSTDOMINATORS_H
17
18
#include "llvm/CodeGen/MachineDominators.h"
19
#include "llvm/CodeGen/MachineFunctionPass.h"
20
21
namespace llvm {
22
23
///
24
/// PostDominatorTree Class - Concrete subclass of DominatorTree that is used
25
/// to compute the post-dominator tree.
26
///
27
struct MachinePostDominatorTree : public MachineFunctionPass {
28
private:
29
 PostDomTreeBase<MachineBasicBlock> *DT;
30
31
public:
32
  static char ID;
33
34
  MachinePostDominatorTree();
35
36
  ~MachinePostDominatorTree() override;
37
38
  FunctionPass *createMachinePostDominatorTreePass();
39
40
0
  const SmallVectorImpl<MachineBasicBlock *> &getRoots() const {
41
0
    return DT->getRoots();
42
0
  }
43
44
0
  MachineDomTreeNode *getRootNode() const {
45
0
    return DT->getRootNode();
46
0
  }
47
48
0
  MachineDomTreeNode *operator[](MachineBasicBlock *BB) const {
49
0
    return DT->getNode(BB);
50
0
  }
51
52
50.4k
  MachineDomTreeNode *getNode(MachineBasicBlock *BB) const {
53
50.4k
    return DT->getNode(BB);
54
50.4k
  }
55
56
  bool dominates(const MachineDomTreeNode *A,
57
0
                 const MachineDomTreeNode *B) const {
58
0
    return DT->dominates(A, B);
59
0
  }
60
61
7.14M
  bool dominates(const MachineBasicBlock *A, const MachineBasicBlock *B) const {
62
7.14M
    return DT->dominates(A, B);
63
7.14M
  }
64
65
  bool properlyDominates(const MachineDomTreeNode *A,
66
0
                         const MachineDomTreeNode *B) const {
67
0
    return DT->properlyDominates(A, B);
68
0
  }
69
70
  bool properlyDominates(const MachineBasicBlock *A,
71
0
                         const MachineBasicBlock *B) const {
72
0
    return DT->properlyDominates(A, B);
73
0
  }
74
75
  MachineBasicBlock *findNearestCommonDominator(MachineBasicBlock *A,
76
87.5k
                                                MachineBasicBlock *B) {
77
87.5k
    return DT->findNearestCommonDominator(A, B);
78
87.5k
  }
79
80
  bool runOnMachineFunction(MachineFunction &MF) override;
81
  void getAnalysisUsage(AnalysisUsage &AU) const override;
82
  void print(llvm::raw_ostream &OS, const Module *M = nullptr) const override;
83
};
84
} //end of namespace llvm
85
86
#endif