[PATCH] D71983: [PowerPC] Set the SideEffects of branch & call instructions from 1 to 0
Zhang Kang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 5 18:25:38 PST 2020
ZhangKang added a comment.
In D71983#1799470 <https://reviews.llvm.org/D71983#1799470>, @hfinkel wrote:
> Do you expect any effect at all from doing this? These are all scheduling barriers?
The SideEffect flag is not only used for `scheduling`, for example:
bool ImplicitNullChecks::canHandle(const MachineInstr *MI) {
if (MI->isCall() || MI->mayRaiseFPException() ||
MI->hasUnmodeledSideEffects())
return false;
auto IsRegMask = [](const MachineOperand &MO) { return MO.isRegMask(); };
(void)IsRegMask;
assert(!llvm::any_of(MI->operands(), IsRegMask) &&
"Calls were filtered out above!");
auto IsUnordered = [](MachineMemOperand *MMO) { return MMO->isUnordered(); };
return llvm::all_of(MI->memoperands(), IsUnordered);
}
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71983/new/
https://reviews.llvm.org/D71983
More information about the llvm-commits
mailing list