[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
Wed Mar 17 16:36:17 PDT 2021
dfukalov marked 2 inline comments as done.
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) {
----------------
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<>`.
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