LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
WalkPatternRewriteDriver.h
Go to the documentation of this file.
1//===- WALKPATTERNREWRITEDRIVER.h - Walk Pattern Rewrite Driver -*- C++ -*-===//
2//
3// Part of the LLZK Project, under the Apache License v2.0.
4// See LICENSE.txt for license information.
5// Copyright 2025 Veridise Inc.
6// SPDX-License-Identifier: Apache-2.0
7//
8// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
9// See https://llvm.org/LICENSE.txt for license information.
10// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
11//
12//===----------------------------------------------------------------------===//
13//
14// Declares a helper function to walk the given op and apply rewrite patterns.
15//
16// This file has been ported from a more recent version of LLVM with no changes.
17//
18//===----------------------------------------------------------------------===//
19
20#ifndef MLIR_TRANSFORMS_WALKPATTERNREWRITEDRIVER_H_
21#define MLIR_TRANSFORMS_WALKPATTERNREWRITEDRIVER_H_
22
23#include "mlir/IR/Visitors.h"
24#include "mlir/Rewrite/FrozenRewritePatternSet.h"
25
26namespace mlir {
27
39 Operation *op, const FrozenRewritePatternSet &patterns,
40 RewriterBase::Listener *listener = nullptr
41);
42
43} // namespace mlir
44
45#endif // MLIR_TRANSFORMS_WALKPATTERNREWRITEDRIVER_H_
void walkAndApplyPatterns(Operation *op, const FrozenRewritePatternSet &patterns, RewriterBase::Listener *listener)
A fast walk-based pattern rewrite driver.