[PATCH] D29047: Introduce a basic MemorySSA updater, that supports insertDef and insertUse operations.

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


dberlin created this revision.

This creates a basic MemorySSA updater that handles arbitrary insertion of uses and defs into MemorySSA.
I will extend it to handle moves (the current splice API).

It can be made to handle arbitrary control flow changes.
Currently, it uses the same updater algorithm from https://reviews.llvm.org/D28934.

The main difference is because MemorySSA is single variable, we have
the complete def and use list, and don't need anyone to give it to us
as part of the API.  We also have to rename stores below us in some
cases.

If we go that direction in that patch, i will merge all the updater
implementations (using an updater_traits or something to provide the
get* functions we use, called read*/write* in that patch).

Sadly, the current SSAUpdater algorithm is way too slow to use for
what we are doing here.

I have updated the tests we have to basically build memoryssa
incrementally using the updater api, and make sure it still comes out
the same.

I have also added a fairly complex testcase, but a few more coming.


https://reviews.llvm.org/D29047

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29047.85447.patch
Type: text/x-patch
Size: 26442 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170123/5d2d51ee/attachment.bin>


More information about the llvm-commits mailing list