Skip to content

Commit 95e2c87

Browse files
committed
Update assertion message and remove EHBlocks.clear()
1 parent 5178af2 commit 95e2c87

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

llvm/include/llvm/Analysis/EHUtils.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ namespace llvm {
1616
/// Compute a list of blocks that are only reachable via EH paths.
1717
template <typename FunctionT, typename BlockT>
1818
static void computeEHOnlyBlocks(FunctionT &F, DenseSet<BlockT *> &EHBlocks) {
19-
assert(EHBlocks.empty() && "Output set should be empty");
2019
// A block can be unknown if its not reachable from anywhere
2120
// EH if its only reachable from start blocks via some path through EH pads
2221
// NonEH if it's reachable from Non EH blocks as well.
@@ -80,7 +79,6 @@ static void computeEHOnlyBlocks(FunctionT &F, DenseSet<BlockT *> &EHBlocks) {
8079
}
8180
}
8281

83-
EHBlocks.clear();
8482
for (auto Entry : Statuses) {
8583
if (Entry.second == EH)
8684
EHBlocks.insert(Entry.first);

llvm/lib/Transforms/IPO/SampleProfileProbe.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ void SampleProfileProber::computeCFGHash(
228228

229229
for (BasicBlock *Succ : successors(BBPtr)) {
230230
auto Index = getBlockId(Succ);
231-
assert(Index &&
232-
"Ignored block(zero ID) should not be used for hash computation");
231+
assert(Index && "Ignored block(zero ID) is used for hash computation, it "
232+
"could cause profile checksum mismatch");
233233
for (int J = 0; J < 4; J++)
234234
Indexes.push_back((uint8_t)(Index >> (J * 8)));
235235
}

0 commit comments

Comments
 (0)