[PATCH] D29046: MemorySSA: Link all defs together into an intrusive defslist, to make updater easier

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 12:15:44 PST 2017


dberlin created this revision.

This is the first in a series of patches to add a simple, generalized updater to MemorySSA.

For MemorySSA, every def is may-def, instead of the normal must-def.
(the best way to think of memoryssa is "everything is really one variable, with different versions of that variable at different points in the program).
This means when updating, we end up having to do a bunch of work to touch defs below and above us.

In order to support this quickly, i have ilist'd all the defs for each block.  ilist supports tags, so this is quite easy. the only slightly messy part is that you can't have two iplists for the same type that differ only whether they have the ownership part enabled or not, because the traits are for the value type.

The verifiers have been updated to test that the def order is correct.


https://reviews.llvm.org/D29046

Files:
  include/llvm/Transforms/Utils/MemorySSA.h
  lib/Transforms/Utils/MemorySSA.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29046.85441.patch
Type: text/x-patch
Size: 12637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170123/3584f872/attachment.bin>


More information about the llvm-commits mailing list