[PATCH] D98718: [AA][NFC] Convert AliasResult to class containing offset for PartialAlias case.
Daniil Fukalov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 18 02:37:57 PDT 2021
dfukalov added inline comments.
================
Comment at: llvm/include/llvm/Analysis/MemorySSA.h:304
+ MemoryAccess *DMA, bool Optimized = false,
+ Optional<AliasResult> AR = AliasResult(AliasResult::MayAlias)) {
if (!Optimized) {
----------------
dfukalov wrote:
> asbirlea wrote:
> > dfukalov wrote:
> > > Perhaps `AliasResult` should be replaced with `AliasResult::Result` here and in similar places in MemorySSA? @nikic, @asbirlea, what do you think?
> > Yes. Unless we have a usecase of using the PartialAlias in MemorySSA, I don't think we should have the overhead of creating new class instances for all aliasing result kept in optimized memory accesses.
> Actually I thought about pretty ugly compositions like `AliasResult(AliasResult::MayAlias)`. They are caused by `Optional<AliasResult>`. And speaking of running compiler on x86, IMHO `AliasResult` class overhead is not significant, at least if it is stored in `Optional<>`.
{F15899476}
I've attached diff with a substitution with `using AliasRes = AliasResult::Result`. If this option is ok, I'll update the review' patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98718/new/
https://reviews.llvm.org/D98718
More information about the llvm-commits
mailing list