diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-04-25 04:38:20 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-04-25 04:38:20 +0000 |
commit | e249a45b5b72f82a6e1cdbffd71fd24790776cbd (patch) | |
tree | 79c3c533a322759cff1931b33a971d9da2d43af0 /lib/Analysis | |
parent | 3475765998020c9dcc2d70248f7f7a215c2d1a70 (diff) | |
download | llvm-e249a45b5b72f82a6e1cdbffd71fd24790776cbd.tar.gz llvm-e249a45b5b72f82a6e1cdbffd71fd24790776cbd.tar.bz2 llvm-e249a45b5b72f82a6e1cdbffd71fd24790776cbd.tar.xz |
blockfreq: Unwrap from Loops
When unwrapping loops, just visit the loops rather than all nodes.
<rdar://problem/14292693>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207186 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/BlockFrequencyInfoImpl.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Analysis/BlockFrequencyInfoImpl.cpp b/lib/Analysis/BlockFrequencyInfoImpl.cpp index 6b65bf6478..fd4e7448ac 100644 --- a/lib/Analysis/BlockFrequencyInfoImpl.cpp +++ b/lib/Analysis/BlockFrequencyInfoImpl.cpp @@ -851,10 +851,8 @@ void BlockFrequencyInfoImplBase::unwrapLoops() { for (size_t Index = 0; Index < Working.size(); ++Index) Freqs[Index].Floating = Working[Index].Mass.toFloat(); - for (size_t Index = 0; Index < Working.size(); ++Index) { - if (Working[Index].isLoopHeader()) - unwrapLoopPackage(*this, BlockNode(Index)); - } + for (const LoopData &L : Loops) + unwrapLoopPackage(*this, L.getHeader()); } void BlockFrequencyInfoImplBase::finalizeMetrics() { |