@@ -1464,7 +1464,7 @@ uint64_t DataAggregator::parseLBRSample(const PerfBranchSample &Sample,
14641464 uint64_t To = getBinaryFunctionContainingAddress (LBR.To ) ? LBR.To : 0 ;
14651465 if (!From && !To)
14661466 continue ;
1467- BranchInfo &Info = BranchLBRs[Trace (From, To)];
1467+ TakenBranchInfo &Info = BranchLBRs[Trace (From, To)];
14681468 ++Info.TakenCount ;
14691469 Info.MispredCount += LBR.Mispred ;
14701470 }
@@ -1609,7 +1609,7 @@ void DataAggregator::processBranchEvents() {
16091609
16101610 for (const auto &AggrLBR : BranchLBRs) {
16111611 const Trace &Loc = AggrLBR.first ;
1612- const BranchInfo &Info = AggrLBR.second ;
1612+ const TakenBranchInfo &Info = AggrLBR.second ;
16131613 doBranch (Loc.From , Loc.To , Info.TakenCount , Info.MispredCount );
16141614 }
16151615}
@@ -2253,13 +2253,13 @@ DataAggregator::writeAggregatedFile(StringRef OutputFilename) const {
22532253 } else {
22542254 for (const auto &KV : NamesToBranches) {
22552255 const FuncBranchData &FBD = KV.second ;
2256- for (const llvm::bolt:: BranchInfo &BI : FBD.Data ) {
2256+ for (const BranchInfo &BI : FBD.Data ) {
22572257 writeLocation (BI.From );
22582258 writeLocation (BI.To );
22592259 OutFile << BI.Mispreds << " " << BI.Branches << " \n " ;
22602260 ++BranchValues;
22612261 }
2262- for (const llvm::bolt:: BranchInfo &BI : FBD.EntryData ) {
2262+ for (const BranchInfo &BI : FBD.EntryData ) {
22632263 // Do not output if source is a known symbol, since this was already
22642264 // accounted for in the source function
22652265 if (BI.From .IsSymbol )
@@ -2366,7 +2366,7 @@ std::error_code DataAggregator::writeBATYAML(BinaryContext &BC,
23662366 return std::pair (BlockIt->first , BlockIt->second .getBBIndex ());
23672367 };
23682368
2369- for (const llvm::bolt:: BranchInfo &BI : Branches.Data ) {
2369+ for (const BranchInfo &BI : Branches.Data ) {
23702370 using namespace yaml ::bolt;
23712371 const auto &[BlockOffset, BlockIndex] = getBlock (BI.From .Offset );
23722372 BinaryBasicBlockProfile &YamlBB = YamlBF.Blocks [BlockIndex];
@@ -2388,7 +2388,7 @@ std::error_code DataAggregator::writeBATYAML(BinaryContext &BC,
23882388 }
23892389 }
23902390 // Set entry counts, similar to DataReader::readProfile.
2391- for (const llvm::bolt:: BranchInfo &BI : Branches.EntryData ) {
2391+ for (const BranchInfo &BI : Branches.EntryData ) {
23922392 if (!BlockMap.isInputBlock (BI.To .Offset )) {
23932393 if (opts::Verbosity >= 1 )
23942394 errs () << " BOLT-WARNING: Unexpected EntryData in " << FuncName
0 commit comments