[PATCH] D90249: enable memoryssa for loopsink in new passmanager, expand loopsink testing and fix exposed bug in LICM

Jamie Schmeiser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 09:53:51 PDT 2020


jamieschmeiser created this revision.
jamieschmeiser added reviewers: Carrot, danielcdh.
Herald added subscribers: llvm-commits, asbirlea, hiraditya, Prazek.
Herald added a project: LLVM.
jamieschmeiser requested review of this revision.

Expand existing loopsink testing to also test loopsinking using new pass
manager.  Enable memoryssa for loopsink with new pass manager.  This
combination exposed a bug that was previously fixed for loopsink
without memoryssa.  When sinking an instruction into a loop, the source
block may not be part of the loop but still needs to be checked for
pointer invalidation.  This is the fix for bugzilla #39695 (PR 54659)
expanded to also work with memoryssa.  The bug is only exposed when
all the changes are combined.  Just expanding the tests will not show the
bug nor will just enabling memoryssa in loopsink.  They have to be done
together to show the bug hence both and the fix are all done in this PR.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90249

Files:
  llvm/include/llvm/Transforms/Utils/LoopUtils.h
  llvm/lib/Transforms/Scalar/LICM.cpp
  llvm/lib/Transforms/Scalar/LoopSink.cpp
  llvm/test/Transforms/LICM/loopsink-pr38462.ll
  llvm/test/Transforms/LICM/loopsink-pr39570.ll
  llvm/test/Transforms/LICM/loopsink-pr39695.ll
  llvm/test/Transforms/LICM/loopsink.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90249.301036.patch
Type: text/x-patch
Size: 20585 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201027/0eb3c0e4/attachment.bin>


More information about the llvm-commits mailing list