LLVM  4.0.0
MachinePostDominators.cpp
Go to the documentation of this file.
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 
16 
17 using namespace llvm;
18 
20 
21 //declare initializeMachinePostDominatorTreePass
23  "MachinePostDominator Tree Construction", true, true)
24 
27  DT = new DominatorTreeBase<MachineBasicBlock>(true); //true indicate
28  // postdominator
29 }
30 
33  return new MachinePostDominatorTree();
34 }
35 
36 bool
38  DT->recalculate(F);
39  return false;
40 }
41 
43  delete DT;
44 }
45 
46 void
48  AU.setPreservesAll();
50 }
51 
52 void
54  DT->print(OS);
55 }
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:52
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
#define F(x, y, z)
Definition: MD5.cpp:51
void initializeMachinePostDominatorTreePass(PassRegistry &)
FunctionPass * createMachinePostDominatorTreePass()
Core dominator tree base class.
Definition: LoopInfo.h:59
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
Definition: Pass.h:298
PostDominatorTree Class - Concrete subclass of DominatorTree that is used to compute the post-dominat...
void setPreservesAll()
Set by analyses that do not transform their input at all.
INITIALIZE_PASS(MachinePostDominatorTree,"machinepostdomtree","MachinePostDominator Tree Construction", true, true) MachinePostDominatorTree
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
void print(llvm::raw_ostream &OS, const Module *M=nullptr) const override
print - Print out the internal state of the pass.
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:44