[PATCH] D89447: [MachineInstr] Add support for instructions with multiple memory operands.
Jean-Michel Gorius via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 26 11:20:52 PDT 2020
Kayjukh added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/TargetInstrInfo.h:1733
+ /// in MachineInstr returns conservative result to avoid quadratic overhead.
+ virtual unsigned getMemOperandAACheckLimit() const { return 4; }
+
----------------
hliao wrote:
> dmgreen wrote:
> > So the limit on the number of alias checks is effectively 16?
> >
> > Would it be worth making it so limit is on the total number of checks, not the MemOperands per instruction? That way an instruction with a single operand could be compared to an instruction with many (which I imagine would be a common case).
> Just IMHO, the limit here is more straightforward to figure out. The backend needs to consider the corner case where two instructions with more than one mem operands are checked.
I think it would make sense to still limit the number of checks instead of the number of memory operands. If, say, you put a limit of 16 checks---which would be equivalent to the 4 memory operands you set there----then you can compare both instructions with 4 memory operands each but also an instruction with a single memory operand with another one that happens to have 8.
The bound on the cost would be the same but it would make the check more flexible.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89447/new/
https://reviews.llvm.org/D89447
More information about the llvm-commits
mailing list