[PATCH] D109134: [MemorySSA] Support invariant.group metadata
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 1 23:03:18 PDT 2021
aeubanks created this revision.
Herald added subscribers: asbirlea, george.burgess.iv, hiraditya, Prazek.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The implementation is mostly copied from MemDepAnalysis. We want to look
at all loads and stores to the same pointer operand. Bitcasts and zero
GEPs of a pointer are considered the same pointer value. We choose the
most dominating instruction.
Since updating MemorySSA with invariant.group is non-trivial, for now
handling of invariant.group is not cached in any way, so it's part of
the walker. The number of loads/stores with invariant.group is small for
now anyway. We can revisit if this actually noticeably affects compile
times.
To avoid invariant.group affecting optimized uses, we need to have
optimizeUsesInBlock() not use invariant.group in any way.
Co-authored-by: Piotr Padlewski <prazek at google.com>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D109134
Files:
llvm/lib/Analysis/MemorySSA.cpp
llvm/test/Analysis/MemorySSA/invariant-groups.ll
llvm/test/Transforms/NewGVN/invariant.group-xfail.ll
llvm/test/Transforms/NewGVN/invariant.group.ll
llvm/unittests/Analysis/MemorySSATest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109134.370169.patch
Type: text/x-patch
Size: 19649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210902/d81b9a96/attachment.bin>
More information about the llvm-commits
mailing list