Skip to content

Commit 7d7c947

Browse files
committed
discard BB profiles with a hash of 0
1 parent e493e90 commit 7d7c947

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2417,6 +2417,7 @@ std::error_code DataAggregator::writeBATYAML(BinaryContext &BC,
24172417
// Skip printing if there's no profile data
24182418
llvm::erase_if(
24192419
YamlBF.Blocks, [](const yaml::bolt::BinaryBasicBlockProfile &YamlBB) {
2420+
if ((size_t)YamlBB.Hash == 0) return true;
24202421
auto HasCount = [](const auto &SI) { return SI.Count; };
24212422
bool HasAnyCount = YamlBB.ExecCount ||
24222423
llvm::any_of(YamlBB.Successors, HasCount) ||

0 commit comments

Comments
 (0)