Make MemorySSA::dominates/locallydominates constant time
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM with a few comments; thanks for the patch!
include/llvm/Transforms/Utils/MemorySSA.h | ||
---|---|---|
635 ↗ | (On Diff #64549) | Given that we only ever store true for the value, can this be a DenseSet instead? |
lib/Transforms/Utils/MemorySSA.cpp | ||
1205 ↗ | (On Diff #64549) | Do we need to invalidate numbering here, as well? (Alternatively, we could start all counts from 2, and always give a newly-created phi a value of 1, but that could also be done later as a part of the "number with a stride of N" optimization) |
1582 ↗ | (On Diff #64549) | Nit: Please remove braces |
include/llvm/Transforms/Utils/MemorySSA.h | ||
---|---|---|
635 ↗ | (On Diff #64549) | Replaced with SmallPtrSet |
lib/Transforms/Utils/MemorySSA.cpp | ||
1205 ↗ | (On Diff #64549) | Fixed. so after the equality/etc checks in dominates, you could do if (isa<MemoryPhi>(Dominator)) return true; if (isa<MemoryPhi>(Dominatee)) return false; But we can do this in a followup if it matters. |