My Project
include
mlir
Dialect
LoopOps
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
"
20
#include "
mlir/Transforms/LoopLikeInterface.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 ®ion, 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_
mlir
Definition:
InferTypeOpInterface.cpp:20
LoopLikeInterface.h
mlir::loop::LoopOpsDialect
Definition:
LoopOps.h:27
mlir::loop::LoopOpsDialect::getDialectNamespace
static StringRef getDialectNamespace()
Definition:
LoopOps.h:30
Attributes.h
Builders.h
mlir::loop::LoopOpsDialect::LoopOpsDialect
LoopOpsDialect(MLIRContext *context)
Definition:
LoopOps.cpp:50
mlir::Dialect
Definition:
Dialect.h:39
OpDefinition.h
Dialect.h
mlir::loop::ensureLoopTerminator
void ensureLoopTerminator(Region ®ion, Builder &builder, Location loc)
mlir::MLIRContext
Definition:
MLIRContext.h:34
mlir::loop::getForInductionVarOwner
ForOp getForInductionVarOwner(Value val)
Generated by
1.8.13