Files
clang-p2996/mlir/test/mlir-pdll/Parser/include.pdll
River Riddle 11d26bd143 [mlir][PDLL] Add an initial frontend for PDLL
This is a new pattern rewrite frontend designed from the ground
up to support MLIR constructs, and to target PDL. This frontend
language was proposed in https://llvm.discourse.group/t/rfc-pdll-a-new-declarative-rewrite-frontend-for-mlir/4798

This commit starts sketching out the base structure of the
frontend, and is intended to be a minimal starting point for
building up the language. It essentially contains support for
defining a pattern, variables, and erasing an operation. The
features mentioned in the proposal RFC (including IDE support)
will be added incrementally in followup commits.

I intend to upstream the documentation for the language in a
followup when a bit more of the pieces have been landed.

Differential Revision: https://reviews.llvm.org/D115093
2021-12-16 02:08:12 +00:00

16 lines
340 B
Plaintext

// RUN: mlir-pdll %s -I %S | FileCheck %s
Pattern BeforeIncludedPattern {
erase _: Op;
}
#include "include/included.pdll"
Pattern AfterIncludedPattern {
erase _: Op;
}
// CHECK: PatternDecl {{.*}} Name<BeforeIncludedPattern>
// CHECK: PatternDecl {{.*}} Name<IncludedPattern>
// CHECK: PatternDecl {{.*}} Name<AfterIncludedPattern>