Skip to content
Snippets Groups Projects
Commit 2bdb38ad authored by Aaron Councilman's avatar Aaron Councilman
Browse files

Further fix: avoid back-edges in traversing region

parent be05b90b
No related branches found
No related tags found
No related merge requests found
......@@ -728,9 +728,14 @@ bool HCCVerifier::verifyUses(RegionTree& region, std::set<Value*> inputs,
extraInstructions = true;
} else {
// Add the basic blocks we can reach from this branch to the
// list to explore (if we haven't already)
// list to explore (if we haven't already). We also don't add
// back-edges since they should already have been processed
// (and if not, only because we skipped over the body because
// it was a parallel loop)
for (BasicBlock* succ : branch->successors()) {
if (reached.find(succ) == reached.end()) {
if (reached.find(succ) == reached.end()
&& (succ != branch->getParent()
&& !DTCache.dominates(succ, branch->getParent()))) {
toSearch.insert(succ);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment