[PATCH] D24805: [GVNSink] Initial GVNSink prototype
Daniel Berlin via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 21 10:06:59 PDT 2016
dberlin added inline comments.
================
Comment at: lib/Transforms/Utils/MemorySSA.cpp:1235
@@ -1234,1 +1234,3 @@
+void MemorySSA::invalidateAll() {
+ // Drop all our references
----------------
You don't need this at all, AFAIK.
If you just want something that works, while it's being reviewed, we discuss the update semantics, etc, do what sebpop did in early gvnhoist:
Instead of using memoryssa as a pass, use it as a utility.
ie something like:
```
MemorySSA *MSSA = new MemorySSA M(F, DT, AA);
for each sink candidate {
try to sink a thing
if we sunk something and we can't update properly {
delete MSSA
MSSA = new MemorySSA M(F, DT, AA);
}
}
```
or whatever the scope it works safely on right now really is. This will work fine.
Then we can gradually push it to be rebuilt less and less.
Eventually, it's out of the loop and at the top level anyway, and we can just go back to the pass version.
Repository:
rL LLVM
https://reviews.llvm.org/D24805
More information about the llvm-commits
mailing list