Skip to content

Instantly share code, notes, and snippets.

/-
Created Feb 22, 2016

Embed
What would you like to do?
diff --git a/lib/Transforms/IPO/FunctionAttrs.cpp b/lib/Transforms/IPO/FunctionAttrs.cpp
index 2eec438..a1c245f 100644
--- a/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -943,12 +943,15 @@ static bool removeConvergentAttrs(const SCCNodeSet &SCCNodes) {
// If we got here, all of the SCC's callees are non-convergent. Therefore all
// of the SCC's functions can be marked as non-convergent.
+ bool MadeChange = false;
for (Function *F : SCCNodes) {
- if (F->isConvergent())
+ if (F->isConvergent()) {
+ MadeChange = true;
DEBUG(dbgs() << "Removing convergent attr from " << F->getName() << "\n");
+ }
F->setNotConvergent();
}
- return true;
+ return MadeChange;
}
static bool setDoesNotRecurse(Function &F) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.