[PATCH] D135376: [Transforms/ObjCARC] Fix non-deterministic output of `ObjCARCOptPass`
Argyrios Kyrtzidis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 6 10:40:33 PDT 2022
akyrtzi created this revision.
Herald added subscribers: mgrang, hiraditya.
Herald added a project: All.
akyrtzi requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
`ProvenanceAnalysis::related()` was assuming that the order of parameters for `relatedCheck()` was not affecting
the result but this was not the case when both parameters were `PHINode`s.
Due to this assumption `ProvenanceAnalysis::related()` was ordering the parameters based on pointer value which resulted in
non-deterministic behavior.
To address this change `relatedPHI()` so that it gives the same result independent of the parameter order.
rdar://100325456
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D135376
Files:
llvm/lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp
llvm/test/Transforms/ObjCARC/related-check.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135376.465783.patch
Type: text/x-patch
Size: 11886 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221006/c3b92d58/attachment.bin>
More information about the llvm-commits
mailing list