[PATCH] D116825: [GVN] MemorySSA for GVN: use MemorySSA for redundant loads elimination

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 27 07:53:20 PDT 2022


chill updated this revision to Diff 440218.
chill added a comment.

Revert to a previous version, which scanned all the memory
accesses in a block. Add a testcase showing why it's necessary.

I've looked at Eigen benchmarks (matrix multiplications and additions), there were some differences
(relative to GVN using MemDep), but so far I've only seen GVN/MemorySSA removing more loads (e.g. MemDep hits
the block scan limit of 100 instructions, whereas GVN/MemorySSA is within the limit of 100 memory accesses). Increasing the limit
(to 300 for example), eliminated the differences at LLVM IR level, but looks like there's still some at asm level.

There some improvements, some regressions with Eigen, but nothing anywhere near 50-80%.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116825/new/

https://reviews.llvm.org/D116825

Files:
  llvm/include/llvm/Transforms/Scalar/GVN.h
  llvm/lib/Transforms/Scalar/GVN.cpp
  llvm/test/Analysis/TypeBasedAliasAnalysis/gvn-nonlocal-type-mismatch.ll
  llvm/test/Transforms/GVN/PRE/rle.ll
  llvm/test/Transforms/LoopVectorize/X86/metadata-enable.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116825.440218.patch
Type: text/x-patch
Size: 44573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220627/277dd828/attachment.bin>


More information about the llvm-commits mailing list