brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 60c9828 Raw
36 lines · c
1//===- TransformsDetail.h - -------------------------------------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef MLIR_DIALECT_SHARD_TRANSFORMS_TRANSFORMSDETAIL_H10#define MLIR_DIALECT_SHARD_TRANSFORMS_TRANSFORMSDETAIL_H11 12#include "mlir/IR/PatternMatch.h"13#include "mlir/IR/SymbolTable.h"14 15namespace mlir {16namespace shard {17 18template <typename Op>19struct OpRewritePatternWithSymbolTableCollection : OpRewritePattern<Op> {20  template <typename... OpRewritePatternArgs>21  OpRewritePatternWithSymbolTableCollection(22      SymbolTableCollection &symbolTableCollection,23      OpRewritePatternArgs &&...opRewritePatternArgs)24      : OpRewritePattern<Op>(25            std::forward<OpRewritePatternArgs...>(opRewritePatternArgs)...),26        symbolTableCollection(symbolTableCollection) {}27 28protected:29  SymbolTableCollection &symbolTableCollection;30};31 32} // namespace shard33} // namespace mlir34 35#endif // MLIR_DIALECT_SHARD_TRANSFORMS_TRANSFORMSDETAIL_H36