blockfreq: Store the header with the members

<rdar://problem/14292693>

llvm-svn: 207182
This commit is contained in:
Duncan P. N. Exon Smith
2014-04-25 04:38:09 +00:00
parent 39cc64827e
commit 1cab8a0708
2 changed files with 18 additions and 10 deletions

View File

@@ -746,7 +746,7 @@ void BlockFrequencyInfoImplBase::packageLoop(LoopData &Loop) {
DEBUG(dbgs() << "packaging-loop: " << getBlockName(Loop.getHeader()) << "\n");
Loop.IsPackaged = true;
DEBUG(for (const BlockNode &M
: Loop.Members) {
: Loop.members()) {
dbgs() << " - node: " << getBlockName(M.Index) << "\n";
});
}
@@ -859,7 +859,7 @@ static void unwrapLoopPackage(BlockFrequencyInfoImplBase &BFI,
// 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 : LoopPackage.members()) {
const FrequencyData &HeadData = BFI.Freqs[Head.Index];
FrequencyData &Freqs = BFI.Freqs[M.Index];
Float NewFreq = Freqs.Floating * HeadData.Floating;