LLVM  10.0.0svn
MachineDominanceFrontier.h
Go to the documentation of this file.
1 //===- llvm/CodeGen/MachineDominanceFrontier.h ------------------*- C++ -*-===//
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 #ifndef LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H
10 #define LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H
11 
17 #include <vector>
18 
19 namespace llvm {
20 
23 
24 public:
29  using const_iterator =
31 
34 
35  static char ID;
36 
38 
40 
42  return Base.getRoots();
43  }
44 
46  return Base.getRoot();
47  }
48 
49  bool isPostDominator() const {
50  return Base.isPostDominator();
51  }
52 
54  return Base.begin();
55  }
56 
58  return Base.begin();
59  }
60 
62  return Base.end();
63  }
64 
65  const_iterator end() const {
66  return Base.end();
67  }
68 
70  return Base.find(B);
71  }
72 
74  return Base.find(B);
75  }
76 
78  return Base.addBasicBlock(BB, frontier);
79  }
80 
82  return Base.removeBlock(BB);
83  }
84 
86  return Base.addToFrontier(I, Node);
87  }
88 
90  return Base.removeFromFrontier(I, Node);
91  }
92 
93  bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const {
94  return Base.compareDomSet(DS1, DS2);
95  }
96 
98  return Base.compare(Other);
99  }
100 
101  bool runOnMachineFunction(MachineFunction &F) override;
102 
103  void releaseMemory() override;
104 
105  void getAnalysisUsage(AnalysisUsage &AU) const override;
106 };
107 
108 } // end namespace llvm
109 
110 #endif // LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H
const SmallVectorImpl< MachineBasicBlock * > & getRoots() const
This class represents lattice values for constants.
Definition: AllocatorList.h:23
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:41
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:66
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...