LCOV - code coverage report
Current view: top level - lib/CodeGen - MachineDominanceFrontier.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 19 19 100.0 %
Date: 2017-09-14 15:23:50 Functions: 6 6 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===- MachineDominanceFrontier.cpp ---------------------------------------===//
       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             : #include "llvm/CodeGen/MachineDominanceFrontier.h"
      11             : #include "llvm/Analysis/DominanceFrontierImpl.h"
      12             : #include "llvm/CodeGen/MachineDominators.h"
      13             : #include "llvm/CodeGen/Passes.h"
      14             : 
      15             : using namespace llvm;
      16             : 
      17             : namespace llvm {
      18             : template class DominanceFrontierBase<MachineBasicBlock, false>;
      19             : template class DominanceFrontierBase<MachineBasicBlock, true>;
      20             : template class ForwardDominanceFrontierBase<MachineBasicBlock>;
      21             : }
      22             : 
      23             : 
      24             : char MachineDominanceFrontier::ID = 0;
      25             : 
      26       53254 : INITIALIZE_PASS_BEGIN(MachineDominanceFrontier, "machine-domfrontier",
      27             :                 "Machine Dominance Frontier Construction", true, true)
      28       53254 : INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
      29      329885 : INITIALIZE_PASS_END(MachineDominanceFrontier, "machine-domfrontier",
      30             :                 "Machine Dominance Frontier Construction", true, true)
      31             : 
      32         801 : MachineDominanceFrontier::MachineDominanceFrontier()
      33             :   : MachineFunctionPass(ID),
      34        1602 :     Base() {
      35         801 :   initializeMachineDominanceFrontierPass(*PassRegistry::getPassRegistry());
      36         801 : }
      37             : 
      38             : char &llvm::MachineDominanceFrontierID = MachineDominanceFrontier::ID;
      39             : 
      40        1716 : bool MachineDominanceFrontier::runOnMachineFunction(MachineFunction &) {
      41        1716 :   releaseMemory();
      42        1716 :   Base.analyze(getAnalysis<MachineDominatorTree>().getBase());
      43        1716 :   return false;
      44             : }
      45             : 
      46        3432 : void MachineDominanceFrontier::releaseMemory() {
      47        6864 :   Base.releaseMemory();
      48        3432 : }
      49             : 
      50         801 : void MachineDominanceFrontier::getAnalysisUsage(AnalysisUsage &AU) const {
      51        1602 :   AU.setPreservesAll();
      52         801 :   AU.addRequired<MachineDominatorTree>();
      53         801 :   MachineFunctionPass::getAnalysisUsage(AU);
      54         801 : }

Generated by: LCOV version 1.13