[llvm] [SHT_LLVM_BB_ADDR_MAP][AsmPrinter] Add none and all options to PGO Map (PR #111221)

Rahman Lavaee via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 25 16:13:41 PDT 2024


================
@@ -1367,9 +1371,18 @@ static uint32_t getBBAddrMapMetadata(const MachineBasicBlock &MBB) {
 
 static llvm::object::BBAddrMap::Features
 getBBAddrMapFeature(const MachineFunction &MF, int NumMBBSectionRanges) {
-  return {PgoAnalysisMapFeatures.isSet(PGOMapFeaturesEnum::FuncEntryCount),
-          PgoAnalysisMapFeatures.isSet(PGOMapFeaturesEnum::BBFreq),
-          PgoAnalysisMapFeatures.isSet(PGOMapFeaturesEnum::BrProb),
+  bool NoFeatures = PgoAnalysisMapFeatures.isSet(PGOMapFeaturesEnum::None);
----------------
rlavaee wrote:

I suggest you do not allow any other options alongside "none" and "all" (report error otherwise).

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


More information about the llvm-commits mailing list