[PATCH] D157979: [MSSAU] Clarify that the defining access does not matter
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 15 06:51:50 PDT 2023
nikic created this revision.
nikic added reviewers: asbirlea, fhahn.
Herald added subscribers: kmitropoulou, StephenFan, hiraditya.
Herald added a project: All.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
New memory accesses are usually inserted by using one of the createMemoryAccessXYZ() methods followed by insertUse() or insertDef(). createMemoryAccessXYZ() accepts a defining access, however this defining access will always be overwritten by insertUse() / insertDef().
Update the documentation to clarify this, and stop passing Definition to createMemoryAccessXYZ() if it's followed by insertUse/insertDef.
Alternatively, we could also make insertUse / insertDef keep the defining access if it is specified, and only recompute it if it's missing.
https://reviews.llvm.org/D157979
Files:
llvm/include/llvm/Analysis/MemorySSAUpdater.h
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
llvm/lib/Transforms/Scalar/GVN.cpp
llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157979.550312.patch
Type: text/x-patch
Size: 11418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230815/dbfd7e8b/attachment.bin>
More information about the llvm-commits
mailing list