[PATCH] D86486: [DSE,MemorySSA] Limit walker steps.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 14:12:32 PDT 2020


fhahn created this revision.
fhahn added reviewers: dmgreen, efriedma, bryant, asbirlea, george.burgess.iv.
Herald added subscribers: dexonsmith, hiraditya, Prazek.
Herald added a project: LLVM.
fhahn requested review of this revision.

For DSE with MemorySSA it is beneficial to only use a single step with
the MemorySSA walker, so we can better control the number of steps
together with other limits and also weed out invalid/unprofitable paths
early on.

This patch requires a follow-up patch to be most effective, which I will
share soon after putting this patch up.

This temporarily XFAIL's the limit tests, because we now explore more
MemoryDefs that may not alias/clobber the killing def. This will be
improved/fixed by the follow-up patch.

This patch allows us to aggressively cut down compile time, geomean
-O3 -0.64%, ReleaseThinLTO -1.65%, at the expense of fewer stores
removed. Subsequent patches will increase the number of removed stores
again, while keeping compile-time in check.

http://llvm-compile-time-tracker.com/compare.php?from=d8e3294118a8c5f3f97688a704d5a05b67646012&to=0a929b6978a068af8ddb02d0d4714a2843dd8ba9&stat=instructions

The new WalkerStepLimit might warrant an additional option.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86486

Files:
  llvm/include/llvm/Analysis/MemorySSA.h
  llvm/lib/Analysis/MemorySSA.cpp
  llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
  llvm/test/Transforms/DeadStoreElimination/MSSA/debug-counter.ll
  llvm/test/Transforms/DeadStoreElimination/MSSA/memoryssa-scan-limit.ll
  llvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-multipath.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86486.287492.patch
Type: text/x-patch
Size: 6751 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200824/ef949040/attachment.bin>


More information about the llvm-commits mailing list