[PATCH] D72249: Detemplaize m_Op and RecursivePatternMatcher.
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 08:12:04 PST 2020
rriddle requested changes to this revision.
rriddle added inline comments.
================
Comment at: mlir/lib/Dialect/StandardOps/Ops.cpp:200
+static detail::op_matcher m_ConstantIndex() {
+ return detail::op_matcher(ConstantIndexOp::getOperationName());
}
----------------
This is broken. ConstantIndexOp is a "derived" operation from ConstantOp, and shares the same operation name. This revision makes the assumption that there are no "derived" operations(classes that override the base 'classof'), which is false:
https://github.com/llvm/llvm-project/blob/d67c4cc2eb4ddc450c886598b934c111e721ab0c/mlir/include/mlir/Dialect/StandardOps/Ops.h#L128
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72249/new/
https://reviews.llvm.org/D72249
More information about the llvm-commits
mailing list