[PATCH] D142751: Incorrect early exit in updatePredecessorProfileMetadata
Zhi Zhuang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 27 09:29:18 PST 2023
LukeZhuang created this revision.
LukeZhuang added a reviewer: davidxl.
LukeZhuang added a project: LLVM.
Herald added a subscriber: hiraditya.
Herald added a project: All.
LukeZhuang requested review of this revision.
Herald added a subscriber: llvm-commits.
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)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D142751
Files:
llvm/lib/Transforms/Scalar/JumpThreading.cpp
llvm/test/Transforms/JumpThreading/threading_prof4.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142751.492766.patch
Type: text/x-patch
Size: 4613 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230127/f99afffa/attachment.bin>
More information about the llvm-commits
mailing list