[PATCH] D60832: [MemorySSA] LCSSA preserves MemorySSA.

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 17 10:29:40 PDT 2019


asbirlea created this revision.
Herald added subscribers: Prazek, jlebar, mehdi_amini.
Herald added a project: LLVM.

[DO NOT MERGE, DISCUSSION PENDING]

Enabling MemorySSA in the old pass manager leads to MemorySSA being run
twice due to the fact that LCSSA and LoopSimplify do not preserve
MemorySSA. This is the first step to address that: target LCSSA.

LCSSA does not make any changes that invalidate MemorySSA, so it
preserves it by design.

While adding MemorySSA to LCSSA is straight forward, it's complicated by
the fact that the new pass manager instantiates a new AA for the loop
pass manager. After LCSSA (a function pass), the NPM creates the loop
pass pipeline with a new AA, and the preserved MSSA which retains a pointer
to the *old* AA.

This patch shows the updates needed inside MemorySSA (update AA in MSSA
and its walkers), and the corresponding test changes.
These updates most likely need to be extended to include the dom tree.

After this patch, MemorySSA is still run twice.
Step two follows: target LoopSimplify.


Repository:
  rL LLVM

https://reviews.llvm.org/D60832

Files:
  include/llvm/Analysis/LoopAnalysisManager.h
  include/llvm/Analysis/MemorySSA.h
  include/llvm/Transforms/Scalar/LoopPassManager.h
  lib/Analysis/MemorySSA.cpp
  lib/Transforms/Utils/LCSSA.cpp
  test/Other/loop-pm-invalidation.ll
  test/Other/new-pass-manager.ll
  test/Other/opt-O2-pipeline.ll
  test/Other/opt-O3-pipeline.ll
  test/Other/opt-Os-pipeline.ll
  test/Transforms/LoopRotate/pr35210.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60832.195598.patch
Type: text/x-patch
Size: 26703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190417/982425a0/attachment.bin>


More information about the llvm-commits mailing list