[PATCH] D65137: [GVN] Preserve loop related analysis/canonical forms.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 03:15:40 PDT 2019


fhahn created this revision.
fhahn added reviewers: reames, hfinkel, davide.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

LoopInfo can be easily preserved by passing it to the functions that
modify the CFG (SplitCriticalEdge and MergeBlockIntoPredecessor.
SplitCriticalEdge also preserves LoopSimplify and LCSSA form when when passing in
LoopInfo. The test case shows that we preserve LoopSimplify and
LoopInfo. Adding addPreservedID(LCSSAID) did not preserve LCSSA for some
reason.

Also I am not sure if it is possible to preserve those in the new pass
manager, as they aren't analysis passes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65137

Files:
  llvm/include/llvm/Analysis/CFG.h
  llvm/include/llvm/Transforms/Scalar/GVN.h
  llvm/lib/Analysis/CFG.cpp
  llvm/lib/Transforms/Scalar/GVN.cpp
  llvm/test/Transforms/GVN/PRE/2011-06-01-NonLocalMemdepMiscompile.ll
  llvm/test/Transforms/GVN/preserve-analysis.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65137.211270.patch
Type: text/x-patch
Size: 7608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190723/346e28c4/attachment.bin>


More information about the llvm-commits mailing list