HomePhabricator

[CSSPGO] Avoid deleting probe instruction in FoldValueComparisonIntoPredecessors

Authored by wlei on May 18 2021, 1:20 PM.

Description

[CSSPGO] Avoid deleting probe instruction in FoldValueComparisonIntoPredecessors

This change tries to fix a place missing moveAndDanglePseudoProbes . In FoldValueComparisonIntoPredecessors, it folds the BB into predecessors and then marked the BB unreachable. However, the original logic from the BB is still alive, deleting the probe will mislead the SampleLoader mark it as zero count sample.

Reviewed By: hoy, wenlei

Differential Revision: https://reviews.llvm.org/D102721