[llvm] r207186 - blockfreq: Unwrap from Loops
Duncan P. N. Exon Smith
dexonsmith at apple.com
Thu Apr 24 21:38:20 PDT 2014
Author: dexonsmith
Date: Thu Apr 24 23:38:20 2014
New Revision: 207186
URL: http://llvm.org/viewvc/llvm-project?rev=207186&view=rev
Log:
blockfreq: Unwrap from Loops
When unwrapping loops, just visit the loops rather than all nodes.
<rdar://problem/14292693>
Modified:
llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp
Modified: llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp?rev=207186&r1=207185&r2=207186&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp (original)
+++ llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp Thu Apr 24 23:38:20 2014
@@ -851,10 +851,8 @@ void BlockFrequencyInfoImplBase::unwrapL
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() {
More information about the llvm-commits
mailing list