fix UB in dom tree builder
This commit is contained in:
@@ -64,6 +64,8 @@ namespace SAPFOR {
|
||||
int w = vertex[i];
|
||||
|
||||
for (BasicBlock* v : vertices[w]->getPrev()) {
|
||||
if (dfs_num[v] == -1)
|
||||
continue;
|
||||
int u = Eval(dfs_num[v]);
|
||||
|
||||
if (semi[u] < semi[w])
|
||||
@@ -97,4 +99,4 @@ namespace SAPFOR {
|
||||
void buildDominatorTree(std::vector<BasicBlock*>& blocks) {
|
||||
DominatorFinder finder(blocks);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user