[PATCH] D79408: [mlir] Harden verifiers for DMA ops
Andy Davis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 5 10:46:47 PDT 2020
andydavis1 accepted this revision.
andydavis1 added a comment.
This revision is now accepted and ready to land.
Thanks for doing this Alex. The test coverage is great. Thanks!
================
Comment at: mlir/lib/Dialect/StandardOps/IR/Ops.cpp:1509
- if (getNumOperands() != getTagMemRefRank() + getSrcMemRefRank() +
- getDstMemRefRank() + 3 + 1 &&
- getNumOperands() != getTagMemRefRank() + getSrcMemRefRank() +
- getDstMemRefRank() + 3 + 1 + 2) {
+ // Stride-related operands are optional.
+ if (numOperands != numExpectedOperands &&
----------------
Maybe comment that both optional operands need to be present (or none). You have that reflected in the code, but a comment would help explain the + 2.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79408/new/
https://reviews.llvm.org/D79408
More information about the llvm-commits
mailing list