[PATCH] D91833: [SelectionDAG] Avoid aliasing analysis if the object size is unknown.
Nirav Dave via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 23 06:10:02 PST 2020
niravd 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))
----------------
HsiangKai wrote:
> 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.
What about the case where equalBaseIndex returns true, and the lowered addressed access has a known size smaller than the difference? In that case, we should be able to determine that they are do not alias.
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