[llvm] [llvm-objdump] Add support for symbolizing PGOBBAddrMap Info (PR #76386)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 11 18:33:00 PST 2024
================
@@ -1708,13 +1702,12 @@ disassembleObject(ObjectFile &Obj, const ObjectFile &DbgObj,
reportWarning(toString(BBAddrMapsOrErr.takeError()), Obj.getFileName());
return;
}
- for (size_t I = 0; I < (*BBAddrMapsOrErr).size(); ++I) {
- uint64_t BBAddrMapAddr = (*BBAddrMapsOrErr)[I].Addr;
- AddrToBBAddrMap.emplace(BBAddrMapAddr,
- std::move((*BBAddrMapsOrErr)[I]));
- if (PGOAnalyses.size() > 0)
- AddrToPGOAnalysisMap.emplace(BBAddrMapAddr,
- std::move(PGOAnalyses[I]));
+ for (const auto &[FunctionBBAddrMap, FunctionPGOAnalysis] :
+ zip_equal(*BBAddrMapsOrErr, PGOAnalyses)) {
+ AddrToBBAddrMap.emplace(FunctionBBAddrMap.Addr, FunctionBBAddrMap);
+ if (FunctionPGOAnalysis.FeatEnable.anyEnabled())
+ AddrToPGOAnalysisMap.emplace(FunctionBBAddrMap.Addr,
+ FunctionPGOAnalysis);
----------------
boomanaiden154 wrote:
Good point. Updated in the latest version.
https://github.com/llvm/llvm-project/pull/76386
More information about the llvm-commits
mailing list