[llvm] Implements PGOBBAddrMap in Object and ObjectYAML with tests [1/5] (PR #71750)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 21 01:02:46 PST 2023
================
@@ -875,6 +882,101 @@ struct BBAddrMap {
std::vector<BBEntry> BBEntries; // Basic block entries for this function.
};
+/// A feature extension of BBAddrMap that holds information relevant to PGO.
+struct PGOAnalysisMap {
+ /// Bitmask of optional features to include in the PGO extended map.
+ enum class Features {
+ FuncEntryCnt = (1 << 0),
+ BBFreq = (1 << 1),
+ BrProb = (1 << 2),
+ };
+
+ /// Super-set of BBAddrMap::BBEntry with additional fields for block frequency
+ /// and branch probability.
+ struct PGOBBEntry {
+ using BaseMetadata = BBAddrMap::BBEntry::Metadata;
+
+ /// Enum indicating the how many successors a block has. This enum must fit
----------------
jh7370 wrote:
"the how many" - "the" looks misplaced?
https://github.com/llvm/llvm-project/pull/71750
More information about the llvm-commits
mailing list