This is an archive of the discontinued LLVM Phabricator instance.

Incorrect early exit in updatePredecessorProfileMetadata
Needs ReviewPublic

Authored by LukeZhuang on Jan 27 2023, 9:29 AM.

Details

Reviewers
davidxl
Summary

When iterating through all phi operands in updatePredecessorProfileMetadata, we believe it should not return early if we find some invalid cases (multiple predecessors/non-branch-inst). Instead, it should continue to the next operand, because the predecessors ought to be independent of each other.
Otherwise if the invalid case happen to be the first operand in the phi, the function does not process the remaining operands.

(This patch is intended to resolve the issue that is mentioned in https://reviews.llvm.org/D36864)

Diff Detail

Event Timeline

LukeZhuang created this revision.Jan 27 2023, 9:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2023, 9:29 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
LukeZhuang requested review of this revision.Jan 27 2023, 9:29 AM

gentle ping :)