[PATCH] D135376: [Transforms/ObjCARC] Fix non-deterministic output of `ObjCARCOptPass`
Akira Hatanaka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 12 07:46:18 PDT 2022
ahatanak added inline comments.
================
Comment at: llvm/lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp:81
- // Check each unique source of the PHI node against B.
- SmallPtrSet<const Value *, 4> UniqueSrc;
- for (Value *PV1 : A->incoming_values()) {
- if (UniqueSrc.insert(PV1).second && related(PV1, B))
+ if (comparePHISources(PNB, A))
return true;
----------------
This function returns true if either `comparePHISources(PNB, A)` or `comparePHISources(A, B)` returns true. Should it return false if either `comparePHISources(PNB, A)` or `comparePHISources(A, B)` returns false instead? I think `related` returns true when the two pointers are related but also when it doesn't know the answer (i.e., it's being conservative). On the other hand, it returns false only when it's certain that the two pointers aren't related.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135376/new/
https://reviews.llvm.org/D135376
More information about the llvm-commits
mailing list