Skip to content

Commit e41238a

Browse files
committed
debug windows test
1 parent aa0c8d4 commit e41238a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,6 +1423,8 @@ getBBAddrMapFeature(const MachineFunction &MF, int NumMBBSectionRanges) {
14231423
"BB entries info is required for BBFreq and BrProb "
14241424
"features");
14251425
}
1426+
dbgs() << "getBBAddrMapFeature::SkipEmitBBEntries: " << SkipEmitBBEntries
1427+
<< "\n";
14261428
return {FuncEntryCountEnabled, BBFreqEnabled, BrProbEnabled,
14271429
MF.hasBBSections() && NumMBBSectionRanges > 1, SkipEmitBBEntries};
14281430
}
@@ -1442,6 +1444,12 @@ void AsmPrinter::emitBBAddrMapSection(const MachineFunction &MF) {
14421444
OutStreamer->AddComment("feature");
14431445
auto Features = getBBAddrMapFeature(MF, MBBSectionRanges.size());
14441446
OutStreamer->emitInt8(Features.encode());
1447+
if (Features.NoBBEntries)
1448+
dbgs() << "NoBBEntries feature is enabled\n";
1449+
else if (SkipEmitBBEntries)
1450+
dbgs()
1451+
<< "--SkipEmitBBEntries is enabled but NoBBEntries is set to false\n";
1452+
14451453
// Emit BB Information for each basic block in the function.
14461454
if (Features.MultiBBRange) {
14471455
OutStreamer->AddComment("number of basic block ranges");

llvm/test/CodeGen/X86/basic-block-address-map-pgo-features.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-address-map -pgo-analysis-map=bb-freq | FileCheck %s --check-prefixes=CHECK,PGO-BBF,BBF-ONLY
1212
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-address-map -pgo-analysis-map=br-prob | FileCheck %s --check-prefixes=CHECK,PGO-BRP,BRP-ONLY
1313

14-
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-address-map -skip-emit-bb-entries=true -pgo-analysis-map=func-entry-count | FileCheck %s --check-prefixes=SKIP-BB-ENTRIES
14+
; RUN: llc < %s -mtriple=x86_64 -basic-block-address-map -skip-emit-bb-entries=true -pgo-analysis-map=func-entry-count | FileCheck %s --check-prefixes=SKIP-BB-ENTRIES
15+
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-address-map -skip-emit-bb-entries=true -pgo-analysis-map=func-entry-count | FileCheck %s --check-prefixes=SKIP-BB-ENTRIES
1516
; RUN: not llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-address-map -skip-emit-bb-entries -pgo-analysis-map=bb-freq
1617
; RUN: not llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-address-map -skip-emit-bb-entries -pgo-analysis-map=br-prob
1718

0 commit comments

Comments
 (0)