LCOV - code coverage report
Current view: top level - lib/CodeGen - MachinePostDominators.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 15 20 75.0 %
Date: 2017-09-14 15:23:50 Functions: 7 9 77.8 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.13