[PATCH] D91833: [SelectionDAG] Avoid aliasing analysis if the object size is unknown.

Hsiangkai Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 22 19:30:30 PST 2020


HsiangKai added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp:103
+    // vector objects on the stack.
+    if (*NumBytes0 == static_cast<int64_t>(MemoryLocation::UnknownSize) ||
+        *NumBytes1 == static_cast<int64_t>(MemoryLocation::UnknownSize))
----------------
niravd wrote:
> This is too aggressive. We can still determine that a two addresses are non-aliasing even if one is unknown size. (e.g. FrameIndex vs. Global)
The checking is under the condition that BasePtr0.equalBaseIndex(BasePtr1, ...) equals true. It would not be the case you considered.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91833



More information about the llvm-commits mailing list