@@ -1464,7 +1464,7 @@ uint64_t DataAggregator::parseLBRSample(const PerfBranchSample &Sample,
1464
1464
uint64_t To = getBinaryFunctionContainingAddress (LBR.To ) ? LBR.To : 0 ;
1465
1465
if (!From && !To)
1466
1466
continue ;
1467
- BranchInfo &Info = BranchLBRs[Trace (From, To)];
1467
+ TakenBranchInfo &Info = BranchLBRs[Trace (From, To)];
1468
1468
++Info.TakenCount ;
1469
1469
Info.MispredCount += LBR.Mispred ;
1470
1470
}
@@ -1609,7 +1609,7 @@ void DataAggregator::processBranchEvents() {
1609
1609
1610
1610
for (const auto &AggrLBR : BranchLBRs) {
1611
1611
const Trace &Loc = AggrLBR.first ;
1612
- const BranchInfo &Info = AggrLBR.second ;
1612
+ const TakenBranchInfo &Info = AggrLBR.second ;
1613
1613
doBranch (Loc.From , Loc.To , Info.TakenCount , Info.MispredCount );
1614
1614
}
1615
1615
}
@@ -2253,13 +2253,13 @@ DataAggregator::writeAggregatedFile(StringRef OutputFilename) const {
2253
2253
} else {
2254
2254
for (const auto &KV : NamesToBranches) {
2255
2255
const FuncBranchData &FBD = KV.second ;
2256
- for (const llvm::bolt:: BranchInfo &BI : FBD.Data ) {
2256
+ for (const BranchInfo &BI : FBD.Data ) {
2257
2257
writeLocation (BI.From );
2258
2258
writeLocation (BI.To );
2259
2259
OutFile << BI.Mispreds << " " << BI.Branches << " \n " ;
2260
2260
++BranchValues;
2261
2261
}
2262
- for (const llvm::bolt:: BranchInfo &BI : FBD.EntryData ) {
2262
+ for (const BranchInfo &BI : FBD.EntryData ) {
2263
2263
// Do not output if source is a known symbol, since this was already
2264
2264
// accounted for in the source function
2265
2265
if (BI.From .IsSymbol )
@@ -2366,7 +2366,7 @@ std::error_code DataAggregator::writeBATYAML(BinaryContext &BC,
2366
2366
return std::pair (BlockIt->first , BlockIt->second .getBBIndex ());
2367
2367
};
2368
2368
2369
- for (const llvm::bolt:: BranchInfo &BI : Branches.Data ) {
2369
+ for (const BranchInfo &BI : Branches.Data ) {
2370
2370
using namespace yaml ::bolt;
2371
2371
const auto &[BlockOffset, BlockIndex] = getBlock (BI.From .Offset );
2372
2372
BinaryBasicBlockProfile &YamlBB = YamlBF.Blocks [BlockIndex];
@@ -2388,7 +2388,7 @@ std::error_code DataAggregator::writeBATYAML(BinaryContext &BC,
2388
2388
}
2389
2389
}
2390
2390
// Set entry counts, similar to DataReader::readProfile.
2391
- for (const llvm::bolt:: BranchInfo &BI : Branches.EntryData ) {
2391
+ for (const BranchInfo &BI : Branches.EntryData ) {
2392
2392
if (!BlockMap.isInputBlock (BI.To .Offset )) {
2393
2393
if (opts::Verbosity >= 1 )
2394
2394
errs () << " BOLT-WARNING: Unexpected EntryData in " << FuncName
0 commit comments