diff options
| author | Nicolas Vasilache <ntv@google.com> | 2019-01-28 18:28:43 -0800 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 15:42:38 -0700 |
| commit | ae772b79659afff6695170b7d404113c32e35a0d (patch) | |
| tree | 4e2a7254f58f016816fc0bd3f1812e39cc872e17 /mlir/lib/Analysis/NestedMatcher.cpp | |
| parent | ad637f3ccee4be5aa9f738d6665d0b1a326613a7 (diff) | |
| download | bcm5719-llvm-ae772b79659afff6695170b7d404113c32e35a0d.tar.gz bcm5719-llvm-ae772b79659afff6695170b7d404113c32e35a0d.zip | |
Automated rollback of changelist 231318632.
PiperOrigin-RevId: 231327161
Diffstat (limited to 'mlir/lib/Analysis/NestedMatcher.cpp')
| -rw-r--r-- | mlir/lib/Analysis/NestedMatcher.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/mlir/lib/Analysis/NestedMatcher.cpp b/mlir/lib/Analysis/NestedMatcher.cpp index 491a9bef1b9..4f32e9b22f4 100644 --- a/mlir/lib/Analysis/NestedMatcher.cpp +++ b/mlir/lib/Analysis/NestedMatcher.cpp @@ -16,7 +16,6 @@ // ============================================================================= #include "mlir/Analysis/NestedMatcher.h" -#include "mlir/AffineOps/AffineOps.h" #include "mlir/StandardOps/StandardOps.h" #include "llvm/ADT/ArrayRef.h" @@ -187,11 +186,6 @@ FilterFunctionType NestedPattern::getFilterFunction() { return storage->filter; } -static bool isAffineIfOp(const Instruction &inst) { - return isa<OperationInst>(inst) && - cast<OperationInst>(inst).isa<AffineIfOp>(); -} - namespace mlir { namespace matcher { @@ -200,22 +194,16 @@ NestedPattern Op(FilterFunctionType filter) { } NestedPattern If(NestedPattern child) { - return NestedPattern(Instruction::Kind::OperationInst, child, isAffineIfOp); + return NestedPattern(Instruction::Kind::If, child, defaultFilterFunction); } NestedPattern If(FilterFunctionType filter, NestedPattern child) { - return NestedPattern(Instruction::Kind::OperationInst, child, - [filter](const Instruction &inst) { - return isAffineIfOp(inst) && filter(inst); - }); + return NestedPattern(Instruction::Kind::If, child, filter); } NestedPattern If(ArrayRef<NestedPattern> nested) { - return NestedPattern(Instruction::Kind::OperationInst, nested, isAffineIfOp); + return NestedPattern(Instruction::Kind::If, nested, defaultFilterFunction); } NestedPattern If(FilterFunctionType filter, ArrayRef<NestedPattern> nested) { - return NestedPattern(Instruction::Kind::OperationInst, nested, - [filter](const Instruction &inst) { - return isAffineIfOp(inst) && filter(inst); - }); + return NestedPattern(Instruction::Kind::If, nested, filter); } NestedPattern For(NestedPattern child) { |

