CIRCT 20.0.0git
Loading...
Searching...
No Matches
StripOM.cpp
Go to the documentation of this file.
1//===- StripOM.cpp --------------------------------------------------------===//
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-exception
6//
7//===----------------------------------------------------------------------===//
8
11#include "mlir/Pass/Pass.h"
12#include "llvm/Support/Debug.h"
13
14namespace circt {
15namespace om {
16#define GEN_PASS_DEF_STRIPOMPASS
17#include "circt/Dialect/OM/OMPasses.h.inc"
18} // namespace om
19} // namespace circt
20
21using namespace mlir;
22using namespace circt;
23
24namespace {
25struct StripOMPass : public om::impl::StripOMPassBase<StripOMPass> {
26 void runOnOperation() override {
27 for (auto &op : llvm::make_early_inc_range(getOperation().getOps()))
28 if (isa_and_nonnull<om::OMDialect>(op.getDialect()))
29 op.erase();
30 }
31};
32} // namespace
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition om.py:1