LLVM  8.0.1
MachineDominanceFrontier.h
Go to the documentation of this file.
1 //===- llvm/CodeGen/MachineDominanceFrontier.h ------------------*- C++ -*-===//
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 #ifndef LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H
11 #define LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H
12 
18 #include <vector>
19 
20 namespace llvm {
21 
24 
25 public:
30  using const_iterator =
32 
35 
36  static char ID;
37 
39 
41 
43  return Base.getRoots();
44  }
45 
47  return Base.getRoot();
48  }
49 
50  bool isPostDominator() const {
51  return Base.isPostDominator();
52  }
53 
55  return Base.begin();
56  }
57 
59  return Base.begin();
60  }
61 
63  return Base.end();
64  }
65 
66  const_iterator end() const {
67  return Base.end();
68  }
69 
71  return Base.find(B);
72  }
73 
75  return Base.find(B);
76  }
77 
79  return Base.addBasicBlock(BB, frontier);
80  }
81 
83  return Base.removeBlock(BB);
84  }
85 
87  return Base.addToFrontier(I, Node);
88  }
89 
91  return Base.removeFromFrontier(I, Node);
92  }
93 
94  bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const {
95  return Base.compareDomSet(DS1, DS2);
96  }
97 
99  return Base.compare(Other);
100  }
101 
102  bool runOnMachineFunction(MachineFunction &F) override;
103 
104  void releaseMemory() override;
105 
106  void getAnalysisUsage(AnalysisUsage &AU) const override;
107 };
108 
109 } // end namespace llvm
110 
111 #endif // LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H
const SmallVectorImpl< MachineBasicBlock * > & getRoots() const
This class represents lattice values for constants.
Definition: AllocatorList.h:24
DominanceFrontierBase - Common base class for computing forward and inverse dominance frontiers for a...
F(f)
bool isPostDominator() const
isPostDominator - Returns true if analysis based of postdoms
typename DomSetMapType::const_iterator const_iterator
DominanceFrontierBase< MachineBasicBlock, false >::const_iterator const_iterator
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: APFloat.h:42
const SmallVectorImpl< BlockT *> & getRoots() const
getRoots - Return the root blocks of the current CFG.
Base class for the actual dominator tree node.
void removeFromFrontier(iterator I, BlockT *Node)
Core dominator tree base class.
Definition: LoopInfo.h:61
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
Represent the analysis usage information of a pass.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
std::set< BlockT * > DomSetType
const_iterator find(MachineBasicBlock *B) const
bool compare(DominanceFrontierBase &Other) const
compare - Return true if the other dominance frontier base matches this dominance frontier base...
DominanceFrontierBase< MachineBasicBlock, false >::iterator iterator
iterator find(MachineBasicBlock *B)
bool compare(DominanceFrontierBase< MachineBasicBlock, false > &Other) const
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
MachineDominanceFrontier & operator=(const MachineDominanceFrontier &)=delete
MachineBasicBlock * getRoot() const
iterator addBasicBlock(BlockT *BB, const DomSetType &frontier)
DominanceFrontierBase< MachineBasicBlock, false >::DomSetType DomSetType
bool runOnMachineFunction(MachineFunction &F) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
#define I(x, y, z)
Definition: MD5.cpp:58
void removeBlock(BlockT *BB)
removeBlock - Remove basic block BB&#39;s frontier.
void removeFromFrontier(iterator I, MachineBasicBlock *Node)
void removeBlock(MachineBasicBlock *BB)
ForwardDominanceFrontierBase< MachineBasicBlock > & getBase()
This file defines a set of templates that efficiently compute a dominator tree over a generic graph...
bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const
compareDomSet - Return false if two domsets match.
typename DomSetMapType::iterator iterator
void addToFrontier(iterator I, MachineBasicBlock *Node)
iterator addBasicBlock(MachineBasicBlock *BB, const DomSetType &frontier)
bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const
DominanceFrontier Class - Concrete subclass of DominanceFrontierBase that is used to compute a forwar...