OSDN Git Service

MemorySSA: Link all defs together into an intrusive defslist, to make updater easier
authorDaniel Berlin <dberlin@dberlin.org>
Wed, 25 Jan 2017 20:56:19 +0000 (20:56 +0000)
committerDaniel Berlin <dberlin@dberlin.org>
Wed, 25 Jan 2017 20:56:19 +0000 (20:56 +0000)
commitdb632c77aa72e9b26be42ddfe21fe1bce1d3c60f
tree092259264e9923ae74ca9d768a1c23f147de679b
parenteb919477090f814df0b2c14c1e9aa27d6fc715b9
MemorySSA: Link all defs together into an intrusive defslist, to make updater easier

Summary:
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.

Reviewers: george.burgess.iv

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29046

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293085 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/MemorySSA.h
lib/Transforms/Utils/MemorySSA.cpp
unittests/Transforms/Utils/MemorySSA.cpp