#include <SVFLoopAndDomInfo.h>
|
| | SVFLoopAndDomInfo () |
| |
| virtual | ~SVFLoopAndDomInfo () |
| |
| const Map< const SVFBasicBlock *, BBSet > & | getDomFrontierMap () const |
| |
| Map< const SVFBasicBlock *, BBSet > & | getDomFrontierMap () |
| |
| bool | hasLoopInfo (const SVFBasicBlock *bb) const |
| |
| const LoopBBs & | getLoopInfo (const SVFBasicBlock *bb) const |
| |
| const SVFBasicBlock * | getLoopHeader (const LoopBBs &lp) const |
| |
| bool | loopContainsBB (const LoopBBs &lp, const SVFBasicBlock *bb) const |
| |
| void | addToBB2LoopMap (const SVFBasicBlock *bb, const SVFBasicBlock *loopBB) |
| |
| const Map< const SVFBasicBlock *, BBSet > & | getPostDomTreeMap () const |
| |
| Map< const SVFBasicBlock *, BBSet > & | getPostDomTreeMap () |
| |
| const Map< const SVFBasicBlock *, u32_t > & | getBBPDomLevel () const |
| |
| Map< const SVFBasicBlock *, u32_t > & | getBBPDomLevel () |
| |
| const Map< const SVFBasicBlock *, const SVFBasicBlock * > & | getBB2PIdom () const |
| |
| Map< const SVFBasicBlock *, const SVFBasicBlock * > & | getBB2PIdom () |
| |
| Map< const SVFBasicBlock *, BBSet > & | getDomTreeMap () |
| |
| const Map< const SVFBasicBlock *, BBSet > & | getDomTreeMap () const |
| |
| bool | isUnreachable (const SVFBasicBlock *bb) const |
| |
| const BBList & | getReachableBBs () const |
| |
| void | setReachableBBs (BBList &bbs) |
| |
| void | getExitBlocksOfLoop (const SVFBasicBlock *bb, BBList &exitbbs) const |
| |
| bool | isLoopHeader (const SVFBasicBlock *bb) const |
| |
| bool | dominate (const SVFBasicBlock *bbKey, const SVFBasicBlock *bbValue) const |
| |
| bool | postDominate (const SVFBasicBlock *bbKey, const SVFBasicBlock *bbValue) const |
| |
| const SVFBasicBlock * | findNearestCommonPDominator (const SVFBasicBlock *A, const SVFBasicBlock *B) const |
| | find nearest common post dominator of two basic blocks
|
| |
Definition at line 44 of file SVFLoopAndDomInfo.h.
◆ BBList
◆ BBSet
◆ LoopBBs
◆ SVFLoopAndDomInfo()
| SVF::SVFLoopAndDomInfo::SVFLoopAndDomInfo |
( |
| ) |
|
|
inline |
◆ ~SVFLoopAndDomInfo()
| virtual SVF::SVFLoopAndDomInfo::~SVFLoopAndDomInfo |
( |
| ) |
|
|
inlinevirtual |
◆ addToBB2LoopMap()
Definition at line 133 of file SVFLoopAndDomInfo.h.
134 {
136 }
Map< const SVFBasicBlock *, LoopBBs > bb2LoopMap
map a BasicBlock (if it is in a loop) to all the BasicBlocks in this loop
llvm::IRBuilder IRBuilder
◆ dominate()
Definition at line 103 of file SVFValue.cpp.
104{
106 return true;
107
108
110 {
111 return true;
112 }
113
114
116 {
117 return false;
118 }
119
123 {
126 {
127 return true;
128 }
129 }
130
131 return false;
132}
Map< const SVFBasicBlock *, BBSet > & getDomTreeMap()
Map< const SVFBasicBlock *, BBSet > dtBBsMap
map a BasicBlock to BasicBlocks it Dominates
bool isUnreachable(const SVFBasicBlock *bb) const
Set< const SVFBasicBlock * > BBSet
std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > Map
◆ findNearestCommonPDominator()
find nearest common post dominator of two basic blocks
Definition at line 164 of file SVFValue.cpp.
165{
166 assert(
A &&
B &&
"Pointers are not valid");
167 assert(
A->getParent() ==
B->getParent() &&
168 "Two blocks are not in same function");
169
170
171
173 {
174
179
180 if (
lvA->second <
lvB->second) std::swap(
A,
B);
181
185 }
186
188}
const Map< const SVFBasicBlock *, u32_t > & getBBPDomLevel() const
const Map< const SVFBasicBlock *, const SVFBasicBlock * > & getBB2PIdom() const
◆ getBB2LoopMap()
◆ getBB2PIdom() [1/2]
Definition at line 163 of file SVFLoopAndDomInfo.h.
164 {
166 }
Map< const SVFBasicBlock *, const SVFBasicBlock * > bb2PIdom
map a BasicBlock to its immediate dominator in pdom tree, used in findNearestCommonPDominator
◆ getBB2PIdom() [2/2]
◆ getBBPDomLevel() [1/2]
Definition at line 153 of file SVFLoopAndDomInfo.h.
154 {
156 }
Map< const SVFBasicBlock *, u32_t > bb2PdomLevel
map a BasicBlock to its level in pdom tree, used in findNearestCommonPDominator
◆ getBBPDomLevel() [2/2]
◆ getDomFrontierMap() [1/2]
Definition at line 110 of file SVFLoopAndDomInfo.h.
111 {
113 }
Map< const SVFBasicBlock *, BBSet > dfBBsMap
map a BasicBlock to its Dominate Frontier BasicBlocks
◆ getDomFrontierMap() [2/2]
◆ getDomTreeMap() [1/2]
◆ getDomTreeMap() [2/2]
◆ getExitBlocksOfLoop()
Definition at line 84 of file SVFValue.cpp.
85{
87 {
90 {
92 {
94 {
97 }
98 }
99 }
100 }
101}
const LoopBBs & getLoopInfo(const SVFBasicBlock *bb) const
bool hasLoopInfo(const SVFBasicBlock *bb) const
◆ getLoopHeader()
◆ getLoopInfo()
◆ getPostDomTreeMap() [1/2]
Definition at line 143 of file SVFLoopAndDomInfo.h.
144 {
146 }
Map< const SVFBasicBlock *, BBSet > pdtBBsMap
map a BasicBlock to BasicBlocks it PostDominates
◆ getPostDomTreeMap() [2/2]
◆ getReachableBBs()
| const BBList & SVF::SVFLoopAndDomInfo::getReachableBBs |
( |
| ) |
const |
|
inline |
Definition at line 185 of file SVFLoopAndDomInfo.h.
186 {
188 }
BBList reachableBBs
reachable BasicBlocks from the function entry.
◆ hasLoopInfo()
◆ isLoopHeader()
Definition at line 190 of file SVFValue.cpp.
191{
193 {
196 return blocks.front() == bb;
197 }
198 return false;
199}
◆ isUnreachable()
◆ loopContainsBB()
◆ postDominate()
Definition at line 134 of file SVFValue.cpp.
135{
137 return true;
138
139
141 {
142 return true;
143 }
144
145
147 {
148 return false;
149 }
150
154 {
157 {
158 return true;
159 }
160 }
161 return false;
162}
const Map< const SVFBasicBlock *, BBSet > & getPostDomTreeMap() const
◆ setBB2LoopMap()
◆ setBB2PdomLevel()
◆ setBB2PIdom()
◆ setDomFrontierMap()
◆ setDomTreeMap()
◆ setPostDomTreeMap()
◆ setReachableBBs()
| void SVF::SVFLoopAndDomInfo::setReachableBBs |
( |
BBList & |
bbs | ) |
|
|
inline |
◆ GraphDBClient
◆ bb2LoopMap
map a BasicBlock (if it is in a loop) to all the BasicBlocks in this loop
Definition at line 58 of file SVFLoopAndDomInfo.h.
◆ bb2PdomLevel
map a BasicBlock to its level in pdom tree, used in findNearestCommonPDominator
Definition at line 59 of file SVFLoopAndDomInfo.h.
◆ bb2PIdom
map a BasicBlock to its immediate dominator in pdom tree, used in findNearestCommonPDominator
Definition at line 60 of file SVFLoopAndDomInfo.h.
◆ dfBBsMap
◆ dtBBsMap
◆ pdtBBsMap
◆ reachableBBs
| BBList SVF::SVFLoopAndDomInfo::reachableBBs |
|
private |
The documentation for this class was generated from the following files: