[all-commits] [llvm/llvm-project] d6e09c: [CaptureTracking][NFCI] Expose capture tracking logic
Johannes Doerfert via All-commits
all-commits at lists.llvm.org
Fri Mar 11 20:56:52 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d6e09ce86fd9c8907301d150d2d2dc7166355955
https://github.com/llvm/llvm-project/commit/d6e09ce86fd9c8907301d150d2d2dc7166355955
Author: Johannes Doerfert <johannes at jdoerfert.de>
Date: 2022-03-11 (Fri, 11 Mar 2022)
Changed paths:
M llvm/include/llvm/Analysis/CaptureTracking.h
M llvm/lib/Analysis/CaptureTracking.cpp
Log Message:
-----------
[CaptureTracking][NFCI] Expose capture tracking logic
The logic exposed by this patch via `llvm::DetermineUseCaptureKind` was
part of `llvm::PointerMayBeCaptured`. In the Attributor we want to keep
track of the work list items but still reuse the logic if a use might
capture a value. A follow up for the Attributor removes ~100 lines of
code and complexity while making future handling of simplified values
possible.
Differential Revision: https://reviews.llvm.org/D121272
Commit: 85daf6973d2bd3216b9d131be5be625b1227016c
https://github.com/llvm/llvm-project/commit/85daf6973d2bd3216b9d131be5be625b1227016c
Author: Johannes Doerfert <johannes at jdoerfert.de>
Date: 2022-03-11 (Fri, 11 Mar 2022)
Changed paths:
M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
M llvm/test/Transforms/Attributor/depgraph.ll
M llvm/test/Transforms/Attributor/dereferenceable-1.ll
Log Message:
-----------
[Attributor] Remove capture tracker usage and follow uses explicitly
Before we used the capture tracker to follow pointer uses, now we do it
explicitly ourselves through the Attributor API. There are multiple
benefits: For one, the boilerplate is cut down by a lot. The class,
potential copies vector, etc. is all not needed anymore. We also do
avoid explicitly looking through memory here, something that was
duplicated and should only live in the `checkForAllUses~ helper. More
importantly, as we do simplifications we need to make sure all parties
are in sync when they reason about uses. The old way did not allow us to
do this but the new one does as every use visiting AA goes through
`checkForAllUses` now..
Compare: https://github.com/llvm/llvm-project/compare/a53ea51dec34...85daf6973d2b
More information about the All-commits
mailing list