[PATCH] D127095: [llvm][CodeGen] Add a default implementation to check whether two memory accesses are trivially disjoint
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 14 15:08:55 PDT 2022
efriedma added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineInstr.cpp:2414
+ for (auto MMOa : MMOpsA) {
+ for (auto MMOb : MMOpsB) {
+ if (!areMemOperandsTriviallyDisjoint(MMOa, MMOb)) {
----------------
Instead of repeating the loop from MachineInstr::mayAlias, can we make MemOperandsHaveAlias call areMemOperandsTriviallyDisjoint?
================
Comment at: llvm/lib/CodeGen/MachineInstr.cpp:1358
return !AA->isNoAlias(
MemoryLocation(ValA, OverlapA, UseTBAA ? MMOa->getAAInfo() : AAMDNodes()),
----------------
csstormq wrote:
> efriedma wrote:
> > Do we reach this call isNoAlias() for two different intoptr constants? Does it not handle the case you're trying to deal with?
> >
> I migrate our backend to the latest main branch. And I tried again. I truly reach this call isNoAlias() for two different intoptr constants using gdb step by step, but it still returns false wrongly.
Maybe worth looking into modifying BasicAAResult::aliasCheck to make this work? That would also benefit IR-level optimizations.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127095/new/
https://reviews.llvm.org/D127095
More information about the llvm-commits
mailing list