summaryrefslogtreecommitdiff
path: root/lib/Analysis/BlockFrequencyInfoImpl.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-04-25 04:38:25 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-04-25 04:38:25 +0000
commitf47649f7f96bbbf3b79b428b885114777a8175aa (patch)
treee95818975ba6496b4707e65745a1080615c1d96e /lib/Analysis/BlockFrequencyInfoImpl.cpp
parented306d0cf5b98970c19d4698f239a293c2bda1f0 (diff)
downloadllvm-f47649f7f96bbbf3b79b428b885114777a8175aa.tar.gz
llvm-f47649f7f96bbbf3b79b428b885114777a8175aa.tar.bz2
llvm-f47649f7f96bbbf3b79b428b885114777a8175aa.tar.xz
blockfreq: unwrapLoopPackage() => unwrapLoop()
<rdar://problem/14292693> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207188 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BlockFrequencyInfoImpl.cpp')
-rw-r--r--lib/Analysis/BlockFrequencyInfoImpl.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/Analysis/BlockFrequencyInfoImpl.cpp b/lib/Analysis/BlockFrequencyInfoImpl.cpp
index e953b43e37..6327959580 100644
--- a/lib/Analysis/BlockFrequencyInfoImpl.cpp
+++ b/lib/Analysis/BlockFrequencyInfoImpl.cpp
@@ -806,8 +806,7 @@ static void convertFloatingToInteger(BlockFrequencyInfoImplBase &BFI,
}
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(BlockFrequencyInfoImplBase &BFI,
///
/// 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::unwrapLoops() {
Freqs[Index].Floating = Working[Index].Mass.toFloat();
for (LoopData &Loop : Loops)
- unwrapLoopPackage(*this, Loop);
+ unwrapLoop(*this, Loop);
}
void BlockFrequencyInfoImplBase::finalizeMetrics() {