LLVM  9.0.0svn
MachinePostDominators.cpp
Go to the documentation of this file.
1 //===- MachinePostDominators.cpp -Machine Post Dominator Calculation ------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file implements simple dominator construction algorithms for finding
10 // post dominators on machine functions.
11 //
12 //===----------------------------------------------------------------------===//
13 
15 
16 using namespace llvm;
17 
18 namespace llvm {
19 template class DominatorTreeBase<MachineBasicBlock, true>; // PostDomTreeBase
20 }
21 
23 
24 //declare initializeMachinePostDominatorTreePass
26  "MachinePostDominator Tree Construction", true, true)
27 
31 }
32 
35  return new MachinePostDominatorTree();
36 }
37 
38 bool
40  DT->recalculate(F);
41  return false;
42 }
43 
45  delete DT;
46 }
47 
48 void
50  AU.setPreservesAll();
52 }
53 
54 void
56  DT->print(OS);
57 }
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
This class represents lattice values for constants.
Definition: AllocatorList.h:23
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:65
F(f)
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...
void initializeMachinePostDominatorTreePass(PassRegistry &)
FunctionPass * createMachinePostDominatorTreePass()
Core dominator tree base class.
Definition: LoopInfo.h:63
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Represent the analysis usage information of a pass.
INITIALIZE_PASS(MachinePostDominatorTree, "machinepostdomtree", "MachinePostDominator Tree Construction", true, true) MachinePostDominatorTree
FunctionPass class - This class is used to implement most global optimizations.
Definition: Pass.h:284
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.
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:45