My Project
LoopOps.h
Go to the documentation of this file.
1 //===- Ops.h - Loop MLIR Operations -----------------------------*- C++ -*-===//
2 //
3 // Part of the MLIR 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 //
9 // This file defines convenience types for working with loop operations.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef MLIR_LOOPOPS_OPS_H_
14 #define MLIR_LOOPOPS_OPS_H_
15 
16 #include "mlir/IR/Attributes.h"
17 #include "mlir/IR/Builders.h"
18 #include "mlir/IR/Dialect.h"
19 #include "mlir/IR/OpDefinition.h"
21 
22 namespace mlir {
23 namespace loop {
24 
25 class TerminatorOp;
26 
27 class LoopOpsDialect : public Dialect {
28 public:
29  LoopOpsDialect(MLIRContext *context);
30  static StringRef getDialectNamespace() { return "loop"; }
31 };
32 
33 #define GET_OP_CLASSES
34 #include "mlir/Dialect/LoopOps/LoopOps.h.inc"
35 
36 // Insert `loop.terminator` at the end of the only region's only block if it
37 // does not have a terminator already. If a new `loop.terminator` is inserted,
38 // the location is specified by `loc`. If the region is empty, insert a new
39 // block first.
40 void ensureLoopTerminator(Region &region, Builder &builder, Location loc);
41 
44 ForOp getForInductionVarOwner(Value val);
45 
46 } // end namespace loop
47 } // end namespace mlir
48 #endif // MLIR_LOOPOPS_OPS_H_
Definition: InferTypeOpInterface.cpp:20
Definition: LoopOps.h:27
static StringRef getDialectNamespace()
Definition: LoopOps.h:30
LoopOpsDialect(MLIRContext *context)
Definition: LoopOps.cpp:50
Definition: Dialect.h:39
void ensureLoopTerminator(Region &region, Builder &builder, Location loc)
Definition: MLIRContext.h:34
ForOp getForInductionVarOwner(Value val)