LLVM  3.7.0
DominanceFrontier.cpp
Go to the documentation of this file.
1 //===- DominanceFrontier.cpp - Dominance Frontier 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 
12 
13 using namespace llvm;
14 
15 namespace llvm {
18 }
19 
20 char DominanceFrontier::ID = 0;
21 
23  "Dominance Frontier Construction", true, true)
26  "Dominance Frontier Construction", true, true)
27 
28 DominanceFrontier::DominanceFrontier()
29  : FunctionPass(ID),
30  Base() {
32 }
33 
35  Base.releaseMemory();
36 }
37 
39  releaseMemory();
40  Base.analyze(getAnalysis<DominatorTreeWrapperPass>().getDomTree());
41  return false;
42 }
43 
45  AU.setPreservesAll();
47 }
48 
49 void DominanceFrontier::print(raw_ostream &OS, const Module *) const {
50  Base.print(OS);
51 }
52 
53 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
55  print(dbgs());
56 }
57 #endif
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
INITIALIZE_PASS_BEGIN(DominanceFrontier,"domfrontier","Dominance Frontier Construction", true, true) INITIALIZE_PASS_END(DominanceFrontier
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:114
DominanceFrontierBase - Common base class for computing forward and inverse dominance frontiers for a...
AnalysisUsage & addRequired()
#define INITIALIZE_PASS_DEPENDENCY(depName)
Definition: PassSupport.h:70
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
Definition: PassSupport.h:75
void print(raw_ostream &OS, const Module *=nullptr) const override
print - Print out the internal state of the pass.
Dominance Frontier Construction
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
Definition: Pass.h:294
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
Definition: Debug.cpp:123
void initializeDominanceFrontierPass(PassRegistry &)
void setPreservesAll()
Set by analyses that do not transform their input at all.
bool runOnFunction(Function &) override
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass...
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:38
Dominance Frontier true
Legacy analysis pass which computes a DominatorTree.
Definition: Dominators.h:203
DominanceFrontier Class - Concrete subclass of DominanceFrontierBase that is used to compute a forwar...