[all-commits] [llvm/llvm-project] d877e3: [Transforms/ObjCARC] Fix non-deterministic output ...
Argyrios Kyrtzidis via All-commits
all-commits at lists.llvm.org
Fri Oct 14 12:27:28 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d877e3fe71676b0ff10410d80456b35cdd5bf796
https://github.com/llvm/llvm-project/commit/d877e3fe71676b0ff10410d80456b35cdd5bf796
Author: Argyrios Kyrtzidis <kyrtzidis at apple.com>
Date: 2022-10-14 (Fri, 14 Oct 2022)
Changed paths:
M llvm/lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp
A llvm/test/Transforms/ObjCARC/related-check.ll
Log Message:
-----------
[Transforms/ObjCARC] Fix non-deterministic output of `ObjCARCOptPass`
`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
Differential Revision: https://reviews.llvm.org/D135376
More information about the All-commits
mailing list