diff options
| author | David Blaikie <dblaikie@gmail.com> | 2017-06-02 21:24:17 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2017-06-02 21:24:17 +0000 |
| commit | 6aeacaa5277312126c7ec1a31ceb0e1249738f59 (patch) | |
| tree | 15e2146695ed34c4872a8bd3c3d40d3962628835 /llvm/lib/Transforms | |
| parent | dfa892139ce9f89ce40037a6baed1019b2b392cb (diff) | |
| download | bcm5719-llvm-6aeacaa5277312126c7ec1a31ceb0e1249738f59.tar.gz bcm5719-llvm-6aeacaa5277312126c7ec1a31ceb0e1249738f59.zip | |
FunctionAttrs: Skip it if the effective SCC (ignoring optnone functions) is empty
Minor optimization but mostly simplifies my debugging so I'm not dealing
with empty SCCNodeSets while investigating issues in this optimization.
llvm-svn: 304597
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp index 28cc81c76d4..5cc29a49379 100644 --- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp @@ -1188,6 +1188,10 @@ static bool runImpl(CallGraphSCC &SCC, AARGetterT AARGetter) { SCCNodes.insert(F); } + // Skip it if the SCC only contains optnone functions. + if (SCCNodes.empty()) + return Changed; + Changed |= addArgumentReturnedAttrs(SCCNodes); Changed |= addReadAttrs(SCCNodes, AARGetter); Changed |= addArgumentAttrs(SCCNodes); |

