[all-commits] [llvm/llvm-project] b84ea7: [Attributor] Improve use of dominating writes duri...
Johannes Doerfert via All-commits
all-commits at lists.llvm.org
Tue Jan 10 14:22:17 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b84ea7a4758690f7c7b327f5d47bd3013a3b1619
https://github.com/llvm/llvm-project/commit/b84ea7a4758690f7c7b327f5d47bd3013a3b1619
Author: Johannes Doerfert <johannes at jdoerfert.de>
Date: 2023-01-10 (Tue, 10 Jan 2023)
Changed paths:
M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
M llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll
M llvm/test/Transforms/Attributor/value-simplify-assume.ll
A llvm/test/Transforms/Attributor/value-simplify-dominance.ll
M llvm/test/Transforms/Attributor/value-simplify-pointer-info-struct.ll
M llvm/test/Transforms/Attributor/value-simplify-reachability.ll
Log Message:
-----------
[Attributor] Improve use of dominating writes during reasoning
This resolves a recent regression introduced by a bug fix and allows us
to use dominating write information (formerly HasBeenWrittenTo
information) to skip potential interfering accesses.
Generally, there are two changes here:
1) If we have dominating writes they form a chain and we can look at the
least one to minimize the distance between the write and the (read)
access in question.
2) If such a least dominating write exists, we can ignore writes in
other functions as long as they cannot be reached from code between
this write and the (read) access in question.
We have all the tools available to make such queries and the positive
tests show the result. Note that the negative test from the bug fix is
still in tree and not affected.
As a side-effect, we can remove the (arbitrary) treshold now on the
number of interfering accesses since we do not iterate over dominating
ones anymore.
More information about the All-commits
mailing list