[PATCH] D106185: [Attributor] Introduce getPotentialCopiesOfStoredValue and use it
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 16 13:23:33 PDT 2021
jdoerfert created this revision.
jdoerfert added reviewers: kuter, ggeorgakoudis, wsmoses.
Herald added subscribers: ormris, okura, uenoku, bollu, hiraditya.
Herald added a reviewer: uenoku.
Herald added a reviewer: homerdin.
jdoerfert requested review of this revision.
Herald added a reviewer: sstefan1.
Herald added subscribers: bbn, sstefan1.
Herald added a reviewer: baziotis.
Herald added a project: LLVM.
This patch introduces `getPotentialCopiesOfStoredValue` which uses
AAPointerInfo to determine all "aliases" or "potential copies" of a
value that is stored into memory. This operation can fail but if it
succeeds it means we can visit all "uses" of a value even if it is
temporarily stored in memory.
There are two users for the function:
1. `Attributor::checkForAllUses` which will now ignore the value use in a store if all "potential copies" can be identified and instead be visited. This allows various AAs, including AAPointerInfo itself, to look through memory.
2. `AANoCapture` which uses a custom use tracking through the CaptureTracker interface and therefore needs to be thought explicitly.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D106185
Files:
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/test/Transforms/Attributor/ArgumentPromotion/byval-2.ll
llvm/test/Transforms/Attributor/ArgumentPromotion/fp80.ll
llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll
llvm/test/Transforms/Attributor/nodelete.ll
llvm/test/Transforms/Attributor/value-simplify.ll
llvm/test/Transforms/OpenMP/custom_state_machines.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106185.359430.patch
Type: text/x-patch
Size: 60514 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210716/bbad3e64/attachment.bin>
More information about the llvm-commits
mailing list