[PATCH] D67612: [UnrolledInstAnalyzer] Use MSSA to find stored values outside of loop.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 05:20:38 PDT 2019


fhahn created this revision.
fhahn added reviewers: efriedma, dmgreen, hfinkel, asbirlea.
Herald added subscribers: dkrupp, donat.nagy, Szelethus, a.sidorin, george.burgess.iv, zzheng, baloghadamsoftware, hiraditya, Prazek.
Herald added a project: LLVM.

In UnrolledInstAnalyzer, we already simplify the addresses of loads
inside the loop to a base pointer and offset. We can use this
information to check if we can find a store outside the loop that is a
def for the load, if unrolled.o

To find potentially defining stores, this patch uses MemorySSA. I am not
entirely sure if it is a good idea to rely on MemorySSA here already.
@asbirlea, what do you think?

If it makes sense to use MemorySSA here, I'd make sure we preserve it
during loop unrolling. I guess we would have to make sure it gets
preserved until the next MemorySSA user in the pipeline, to negate the
compile time impact.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D67612

Files:
  llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h
  llvm/include/llvm/Transforms/Utils/UnrollLoop.h
  llvm/lib/Analysis/LoopUnrollAnalyzer.cpp
  llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp
  llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
  llvm/test/Transforms/LoopUnroll/unrolled-inst-analyzer-pointers.ll
  llvm/unittests/Analysis/UnrollAnalyzerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67612.220314.patch
Type: text/x-patch
Size: 20004 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190916/949add73/attachment-0001.bin>


More information about the llvm-commits mailing list