[PATCH] D67562: [MemorySSA] Update MSSA for non-conventional AA.

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 14:14:06 PDT 2019


asbirlea added a comment.

> Why does an instruction which doesn't read or write memory have an associated MemorySSA memory access? Do we assume everything accesses memory if basicaa is disabled?

Except for a few cases, we rely on `getModRefInfo` to add `MemoryAccess`es to `Instruction`s, so, yes, without `basicaa`, we're creating accesses where we shouldn't.

> Would it make sense to fix that, instead of adding checks which always fail normally?

Yes, that would make a lot of sense! I was thinking of adding this as as alternative in the patch description so I'm very happy you suggested it.

What I'm conflicted is about is how much "pruning" of things to add when MSSA is creating an access. I don't want to duplicate `basicaa` inside MemorySSA just because we may run without `basicaa`, but I also don't want to end up adding checks everywhere for the `-disable-basicaa` case.
As a first step I can take the conditions `!Inst->mayReadFromMemory() && !Inst->mayWriteToMemory()` and never create accesses for those, but I'm thinking I may still be missing cases where we're disabling basicaa and not making updates.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67562/new/

https://reviews.llvm.org/D67562





More information about the llvm-commits mailing list