[PATCH] D45299: API to update MemorySSA for cloned blocks.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 8 18:23:26 PDT 2018
asbirlea updated this revision to Diff 150598.
asbirlea added a comment.
This update is more a whole rewrite of the APIs.
- I separated the cloning into an API that just clones (1:1 mapping) uses and defs in blocks
- Cloning of blocks must be done in RPO order, assume MSSA api receives the block in the correct order.
- Note that the cloning API will need to change (again) soon to take a vector of maps, once a pending SimpleLoopUnswitch patch (to make a set of clones of the same block at once) lands.
- Exit blocks are handled separately using the api for blocks getting precedessors
- All edges being added are handled in a single call (update phis when adding BB preds), and may end up looking a lot like the DT update (vector of some "update" type).
- This call is adding Phis (if needed) in the BBs gaining predecessors and in the IDF of the blocks now defining accesses.
- Next, it's fixing domination by replacing uses of all defs that may no longer dominate their uses with the nearest dominating def.
- The algorithm to get this right is fairly complex and it does rely on the Def-Def optimizations being Uses, which is not currently the case.
- APIs to move accesses updated based on future usage in unswitch
- removeBlocks APis simplified in updater and in mssa.
I would appreciate high-level comments on the approach/algorithm first.
Repository:
rL LLVM
https://reviews.llvm.org/D45299
Files:
include/llvm/Analysis/MemorySSA.h
include/llvm/Analysis/MemorySSAUpdater.h
lib/Analysis/MemorySSA.cpp
lib/Analysis/MemorySSAUpdater.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45299.150598.patch
Type: text/x-patch
Size: 35493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180609/fb5a8234/attachment.bin>
More information about the llvm-commits
mailing list