[PATCH] D59794: [DAGCombiner] Unify Lifetime and memory Op aliasing.
Nirav Dave via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 26 13:29:16 PDT 2019
niravd marked 2 inline comments as done.
niravd added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:19394
+ (LN->hasOffset()) ? LN->getOffset() : 0,
+ false /*isVolatile*/, (LN->hasOffset()) ? (unsigned)LN->getSize() : (~0),
+ (MachineMemOperand *)nullptr);
----------------
courbet wrote:
> please add a comment to explain `~0`.
> The original code had `// Be conservative if we don't know the extents of the object.`
>
> Actually I'm not sure how the new code ensures that we never return `true` for `isAlias`, because the large size only means that we're saying that the lifetime aliases all memory **after** the base ptr, not before.
I've wrapped it in an optional as we conservatively never use the size without the offset.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59794/new/
https://reviews.llvm.org/D59794
More information about the llvm-commits
mailing list