[PATCH] D34181: MachineInstr: Reason locally about some memory objects before going to AA.
Geoff Berry via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 14 10:42:58 PDT 2017
gberry added inline comments.
================
Comment at: lib/CodeGen/MachineInstr.cpp:1664
+ int64_t WidthB = MMOb->getSize();
+ bool SameVal = MMOa->getValue() == MMOb->getValue();
+ if (!SameVal) {
----------------
I don't think this is right since getValue() will return nullptr for any PseudoSourceValue, so SameVal will always be true for any two PseudoSourceValues, even if they are different.
================
Comment at: lib/CodeGen/MachineInstr.cpp:1667
+ const PseudoSourceValue *PSVa = MMOa->getPseudoValue();
+ const PseudoSourceValue *PSVb = MMOb->getPseudoValue();
+ if (PSVa && PSVb && (PSVa == PSVb))
----------------
I think the more interesting checks for PseudoValues are whether they can alias at all (i.e. PseudoSourceValue::isAliased/mayAlias), and if not they can only alias with themselves.
https://reviews.llvm.org/D34181
More information about the llvm-commits
mailing list