mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[FunctionAttrs] Inline setDoesNotRecurse() and delete it. NFC
It always returns true, which may lead to confusion. Inline it because it is trivial and only called twice.
This commit is contained in:
parent
2485eebd4f
commit
acda854fa5
@ -1345,12 +1345,6 @@ static bool inferAttrsFromFunctionBodies(const SCCNodeSet &SCCNodes) {
|
||||
return AI.run(SCCNodes);
|
||||
}
|
||||
|
||||
static bool setDoesNotRecurse(Function &F) {
|
||||
F.setDoesNotRecurse();
|
||||
++NumNoRecurse;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool addNoRecurseAttrs(const SCCNodeSet &SCCNodes) {
|
||||
// Try and identify functions that do not recurse.
|
||||
|
||||
@ -1377,7 +1371,9 @@ static bool addNoRecurseAttrs(const SCCNodeSet &SCCNodes) {
|
||||
// Every call was to a non-recursive function other than this function, and
|
||||
// we have no indirect recursion as the SCC size is one. This function cannot
|
||||
// recurse.
|
||||
return setDoesNotRecurse(*F);
|
||||
F->setDoesNotRecurse();
|
||||
++NumNoRecurse;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename AARGetterT>
|
||||
@ -1580,7 +1576,9 @@ static bool addNoRecurseAttrsTopDown(Function &F) {
|
||||
if (!CB || !CB->getParent()->getParent()->doesNotRecurse())
|
||||
return false;
|
||||
}
|
||||
return setDoesNotRecurse(F);
|
||||
F.setDoesNotRecurse();
|
||||
++NumNoRecurse;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool deduceFunctionAttributeInRPO(Module &M, CallGraph &CG) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user