[PATCH] D126586: [InstrProf] Single byte counters in coverage

2023-09-01 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem marked an inline comment as done. gulfem added inline comments. Comment at: clang/lib/CodeGen/CodeGenPGO.cpp:1080-1081 +void CodeGenPGO::setProfileVersion(llvm::Module &M) { + if (CGM.getCodeGenOpts().hasProfileClangInstr() && + llvm::EnableSingleByteCoverage) { +

[PATCH] D126586: [InstrProf] Single byte counters in coverage

2023-09-01 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem updated this revision to Diff 42. gulfem added a comment. 1. Use || to merge counters that refer to the same regions 2. Use || to merge counters from raw profiles Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126586/new/ https://reviews.

[PATCH] D126586: [InstrProf] Single byte counters in coverage

2023-08-28 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. In D126586#4622003 , @gulfem wrote: > Fixed the issue that causes a crash in InstCombinePHI.cpp. Phi instructions > need to be inserted at the beginning of basic blocks, and profile increments > need to be inserted after phis for

[PATCH] D126586: [InstrProf] Single byte counters in coverage

2023-08-28 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:4812 +} else + CGF.incrementProfileCounter(E); + } This can be hoist outside `if (llvm::EnableSingleByteCoverage)` Comment at: clang/lib/CodeGe

[PATCH] D126586: [InstrProf] Single byte counters in coverage

2023-08-28 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem updated this revision to Diff 553992. gulfem added a comment. Fixed the issue that causes a crash in InstCombinePHI.cpp. Phi instructions need to be inserted at the beginning of basic blocks, and profile increments need to inserted after phis for conditional operators. Repository: rG LL

[PATCH] D126586: [InstrProf] Single byte counters in coverage

2023-08-24 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. Thanks for your work on this! FYI, I'm getting the following crash when I try to build Chrome's base_unittests with `-mllvm -enable-single-byte-coverage=true`: [195/4447] CXX obj/base/allocator/partition_allocator/allocator_core/pcscan_internal.o FAILED: obj/base/a

[PATCH] D126586: [InstrProf] Single byte counters in coverage

2023-08-18 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem updated this revision to Diff 551687. gulfem added a comment. Remove hyphen between "single counter" for consistency Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126586/new/ https://reviews.llvm.org/D126586 Files: clang/lib/CodeGen/CGExp

[PATCH] D126586: [InstrProf] Single byte counters in coverage

2023-08-18 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem updated this revision to Diff 551686. gulfem added a comment. Ensure the correct traversal order for loops in CodeGenPGO to fix the profile test failures (Profile/cxx-hash-v2.cpp and Profile/cxx-rangefor.cpp) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie