//===- Predicate.cpp - Pattern predicates ---------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "Predicate.h" usingnamespacemlir; usingnamespacemlir::pdl_to_pdl_interp; //===----------------------------------------------------------------------===// // Positions //===----------------------------------------------------------------------===// Position::~Position() = default; /// Returns the depth of the first ancestor operation position. unsigned Position::getOperationDepth() const { … } //===----------------------------------------------------------------------===// // AttributePosition AttributePosition::AttributePosition(const KeyTy &key) : … { … } //===----------------------------------------------------------------------===// // OperandPosition OperandPosition::OperandPosition(const KeyTy &key) : … { … } //===----------------------------------------------------------------------===// // OperandGroupPosition OperandGroupPosition::OperandGroupPosition(const KeyTy &key) : … { … } //===----------------------------------------------------------------------===// // OperationPosition bool OperationPosition::isOperandDefiningOp() const { … }