[llvm] r207188 - blockfreq: unwrapLoopPackage() => unwrapLoop()
Duncan P. N. Exon Smith
dexonsmith at apple.com
Thu Apr 24 21:38:25 PDT 2014
Author: dexonsmith
Date: Thu Apr 24 23:38:25 2014
New Revision: 207188
URL: http://llvm.org/viewvc/llvm-project?rev=207188&view=rev
Log:
blockfreq: unwrapLoopPackage() => unwrapLoop()
<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=207188&r1=207187&r2=207188&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp (original)
+++ llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp Thu Apr 24 23:38:25 2014
@@ -806,8 +806,7 @@ static void convertFloatingToInteger(Blo
}
static void scaleBlockData(BlockFrequencyInfoImplBase &BFI,
- const BlockNode &Node,
- const LoopData &Loop) {
+ const BlockNode &Node, const LoopData &Loop) {
Float F = Loop.Mass.toFloat() * Loop.Scale;
Float &Current = BFI.Freqs[Node.Index].Floating;
@@ -823,18 +822,17 @@ static void scaleBlockData(BlockFrequenc
///
/// Visits all the members of a loop, adjusting their BlockData according to
/// the loop's pseudo-node.
-static void unwrapLoopPackage(BlockFrequencyInfoImplBase &BFI,
- LoopData &LoopPackage) {
- BlockNode Head = LoopPackage.getHeader();
+static void unwrapLoop(BlockFrequencyInfoImplBase &BFI, LoopData &Loop) {
+ BlockNode Head = Loop.getHeader();
DEBUG(dbgs() << "unwrap-loop-package: " << BFI.getBlockName(Head)
- << ": mass = " << LoopPackage.Mass
- << ", scale = " << LoopPackage.Scale << "\n");
- scaleBlockData(BFI, Head, LoopPackage);
+ << ": mass = " << Loop.Mass << ", scale = " << Loop.Scale
+ << "\n");
+ scaleBlockData(BFI, Head, Loop);
// Propagate the head scale through the loop. Since members are visited in
// RPO, the head scale will be updated by the loop scale first, and then the
// final head scale will be used for updated the rest of the members.
- for (const BlockNode &M : LoopPackage.members()) {
+ for (const BlockNode &M : Loop.members()) {
const FrequencyData &HeadData = BFI.Freqs[Head.Index];
FrequencyData &Freqs = BFI.Freqs[M.Index];
Float NewFreq = Freqs.Floating * HeadData.Floating;
@@ -850,7 +848,7 @@ void BlockFrequencyInfoImplBase::unwrapL
Freqs[Index].Floating = Working[Index].Mass.toFloat();
for (LoopData &Loop : Loops)
- unwrapLoopPackage(*this, Loop);
+ unwrapLoop(*this, Loop);
}
void BlockFrequencyInfoImplBase::finalizeMetrics() {
More information about the llvm-commits
mailing list