@@ -73,68 +83,89 @@ FileHeader:
Sections:
- Name:.text.foo
Type:SHT_PROGBITS
-Address: [[FOO_ADDR]]
+Address: 0x4000
Flags: [SHF_ALLOC, SHF_EXECINSTR]
-Content: '503b050520907d02ebf5c3'
+Content: '503b050530907d08ebf50f8dee1fc3'
@@ -858,62 +899,64 @@ struct BBAddrMap {
bool hasIndirectBranch() const { return MD.HasIndirectBranch; }
};
- BBAddrMap(uint64_t Addr, std::vector BBEntries)
- : Addr(Addr), BBEntries(std::move(BBEntries)) {}
+ // Struct representing the BBAddrMap information for
@@ -858,62 +899,64 @@ struct BBAddrMap {
bool hasIndirectBranch() const { return MD.HasIndirectBranch; }
};
- BBAddrMap(uint64_t Addr, std::vector BBEntries)
- : Addr(Addr), BBEntries(std::move(BBEntries)) {}
+ // Struct representing the BBAddrMap information for
@@ -172,6 +172,105 @@ class OtoolOptTable : public CommonOptTable {
"Mach-O object file displaying tool") {}
};
+struct BBAddrMapLabel {
+ std::string BlockLabel;
+ std::string PGOAnalysis;
+};
+
+// This class represents the BBAddrMap and PGOMap
@@ -1693,24 +1750,21 @@ disassembleObject(ObjectFile , const ObjectFile
,
LLVM_DEBUG(LVP.dump());
- std::unordered_map AddrToBBAddrMap;
- std::unordered_map AddrToPGOAnalysisMap;
+ BBAddrMapInfo FullAddrMap;
auto ReadBBAddrMap = [&](std::optional SectionIndex =
@@ -858,62 +899,64 @@ struct BBAddrMap {
bool hasIndirectBranch() const { return MD.HasIndirectBranch; }
};
- BBAddrMap(uint64_t Addr, std::vector BBEntries)
- : Addr(Addr), BBEntries(std::move(BBEntries)) {}
+ // Struct representing the BBAddrMap information for
@@ -1401,17 +1406,48 @@ void AsmPrinter::emitBBAddrMapSection(const
MachineFunction ) {
uint8_t BBAddrMapVersion = OutStreamer->getContext().getBBAddrMapVersion();
OutStreamer->emitInt8(BBAddrMapVersion);
OutStreamer->AddComment("feature");
- auto FeaturesBits =
@@ -1419,32 +1419,50 @@ void ELFState::writeSectionContent(
CBA.write(E.Feature);
SHeader.sh_size += 2;
}
-
-if (Section.PGOAnalyses) {
- if (E.Version < 2)
-WithColor::warning()
-<< "unsupported SHT_LLVM_BB_ADDR_MAP version when
@@ -7574,30 +7573,38 @@ template void
LLVMELFDumper::printBBAddrMaps() {
continue;
}
for (const BBAddrMap : *BBAddrMapOrErr) {
- DictScope D(W, "Function");
- W.printHex("At", AM.Addr);
+ DictScope FD(W, "Function");
+ if
@@ -719,60 +730,83 @@ decodeBBAddrMapImpl(const ELFFile ,
Feature = Data.getU8(Cur); // Feature byte
if (!Cur)
break;
- auto FeatEnableOrErr = PGOAnalysisMap::Features::decode(Feature);
+ auto FeatEnableOrErr =
llvmbot wrote:
@llvm/pr-subscribers-lld-elf
@llvm/pr-subscribers-backend-x86
@llvm/pr-subscribers-clang
Author: Rahman Lavaee (rlavaee)
Changes
Today `-split-machine-functions` and `-fbasic-block-sections={all,list}` cannot
be combined with `-basic-block-sections=labels` (the labels
llvmbot wrote:
@llvm/pr-subscribers-llvm-binary-utilities
Author: Rahman Lavaee (rlavaee)
Changes
Today `-split-machine-functions` and `-fbasic-block-sections={all,list}` cannot
be combined with `-basic-block-sections=labels` (the labels option will be
ignored).
The inconsistency
12 matches
Mail list logo