We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e73d453 commit ddd5741Copy full SHA for ddd5741
llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
@@ -859,9 +859,9 @@ bool SampleProfileLoaderBaseImpl<BT>::propagateThroughEdges(
859
LLVM_DEBUG(dbgs() << "Set self-referential edge weight to: ";
860
printEdgeWeight(dbgs(), SelfReferentialEdge));
861
}
862
- if (UpdateBlockCount && !VisitedBlocks.count(EC) && TotalWeight > 0) {
+ if (UpdateBlockCount && TotalWeight > 0 &&
863
+ VisitedBlocks.insert(EC).second) {
864
BlockWeights[EC] = TotalWeight;
- VisitedBlocks.insert(EC);
865
Changed = true;
866
867
0 commit comments