[PATCH] D93764: [LoopUnswitch] Implement first version of partial unswitching.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 14:05:41 PST 2021


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:742
+          for (Use &U : Current->uses())
+            AccessesToCheck.push_back(cast<MemoryAccess>(U.getUser()));
+        }
----------------
jdoerfert wrote:
> Why do we need to check these uses?
Unfortunately a `MemoryDef` does not necessarily have all may/must-alias defs that follow it as users. For example, I think we could have something like

```
  %0 = MemoryDef (LiveOnEntry)
  %1 = MemoryPhi(%0,...)
  %2 = MemoryDef(%1,...) ; may-alias %0
```
 
depending on what MemorySSA optimizations are applied, I think there could be similar examples with just MemoryDefs.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93764



More information about the llvm-commits mailing list