1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

blockfreq: Pass the Loop directly into unwrapLoopPackage()

<rdar://problem/14292693>

llvm-svn: 207187
This commit is contained in:
Duncan P. N. Exon Smith 2014-04-25 04:38:23 +00:00
parent 3fb457a1d2
commit 4f4a0c2fa2

View File

@ -824,10 +824,8 @@ 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,
const BlockNode &Head) {
assert(Head.isValid());
LoopData &LoopPackage = BFI.getLoopPackage(Head);
LoopData &LoopPackage) {
BlockNode Head = LoopPackage.getHeader();
DEBUG(dbgs() << "unwrap-loop-package: " << BFI.getBlockName(Head)
<< ": mass = " << LoopPackage.Mass
<< ", scale = " << LoopPackage.Scale << "\n");
@ -851,8 +849,8 @@ void BlockFrequencyInfoImplBase::unwrapLoops() {
for (size_t Index = 0; Index < Working.size(); ++Index)
Freqs[Index].Floating = Working[Index].Mass.toFloat();
for (const LoopData &L : Loops)
unwrapLoopPackage(*this, L.getHeader());
for (LoopData &Loop : Loops)
unwrapLoopPackage(*this, Loop);
}
void BlockFrequencyInfoImplBase::finalizeMetrics() {