[llvm] [llvm-objdump] Add support for symbolizing PGOBBAddrMap Info (PR #76386)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 00:22:40 PST 2024


================
@@ -1264,10 +1264,53 @@ static SymbolInfoTy createDummySymbolInfo(const ObjectFile &Obj,
     return SymbolInfoTy(Addr, Name, Type);
 }
 
-static void
-collectBBAddrMapLabels(const std::unordered_map<uint64_t, BBAddrMap> &AddrToBBAddrMap,
-                       uint64_t SectionAddr, uint64_t Start, uint64_t End,
-                       std::unordered_map<uint64_t, std::vector<std::string>> &Labels) {
+struct BBAddrMapLabel {
+  std::string BlockLabel;
+  std::string PGOAnalysis;
+};
+
+static void constructPGOLabelString(std::string &PGOString,
----------------
jh7370 wrote:

I think it would be more natural to return the `std::string` than to take it by reference.

https://github.com/llvm/llvm-project/pull/76386


More information about the llvm-commits mailing list