[PATCH] D30344: [MemorySSA] Add OptimizeUses flag

Piotr Padlewski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 25 02:58:18 PST 2017


Prazek added a comment.

In https://reviews.llvm.org/D30344#686088, @dberlin wrote:

> Can't you just  call setDefiningAccess on the uses in question to set them?


Not sure what do you mean, so I will describe it with more details with new resaon.

I want to have separate list (or other strusture) having only memory accesses with invariant group.
I would like to make a unit test to check if getClobberingAccess returns the best memory def without help of OptimizeUses.

creating instructions, building mssa, then setting up invariant group attributes, and then calling getClobberingAccess won't work, because the link list for invariant groups will be empty (unless mssa would have method like "addInvariantGroupToMemoryAccess", which we probably don't want to have, because no passes should need it.

other way is to create mssa; create instructions with invariant group; insert each instruction into mssa; then call getClobberingAccess, but this seems to be more painfull, than just:

create instructions with invariant group; create mssa WITHOUT optimizing uses; test getClobberingAccess


https://reviews.llvm.org/D30344





More information about the llvm-commits mailing list