MLIR
21.0.0git
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Variables
c
f
h
i
k
m
n
o
p
r
s
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
f
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
c
d
e
f
g
h
i
k
l
m
n
p
r
s
u
v
Related Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Variables
_
a
b
c
d
e
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
h
i
m
n
o
r
s
t
u
v
y
Enumerations
Enumerator
a
b
c
e
f
g
i
m
n
s
t
w
Macros
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
y
z
lib
Dialect
Arith
Transforms
BufferViewFlowOpInterfaceImpl.cpp
Go to the documentation of this file.
1
//===- BufferViewFlowOpInterfaceImpl.cpp - Buffer View Flow Analysis ------===//
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
9
#include "
mlir/Dialect/Arith/Transforms/BufferViewFlowOpInterfaceImpl.h
"
10
11
#include "
mlir/Dialect/Arith/IR/Arith.h
"
12
#include "
mlir/Dialect/Bufferization/IR/BufferViewFlowOpInterface.h
"
13
14
using namespace
mlir
;
15
using namespace
mlir::bufferization
;
16
17
namespace
mlir
{
18
namespace
arith {
19
namespace
{
20
21
struct
SelectOpInterface
22
:
public
BufferViewFlowOpInterface::ExternalModel<SelectOpInterface,
23
SelectOp> {
24
void
25
populateDependencies(
Operation
*op,
26
RegisterDependenciesFn
registerDependenciesFn)
const
{
27
auto
selectOp = cast<SelectOp>(op);
28
29
// Either one of the true/false value may be selected at runtime.
30
registerDependenciesFn(selectOp.getTrueValue(), selectOp.getResult());
31
registerDependenciesFn(selectOp.getFalseValue(), selectOp.getResult());
32
}
33
};
34
35
}
// namespace
36
}
// namespace arith
37
}
// namespace mlir
38
39
void
arith::registerBufferViewFlowOpInterfaceExternalModels
(
40
DialectRegistry
®istry) {
41
registry.
addExtension
(+[](
MLIRContext
*ctx, arith::ArithDialect *dialect) {
42
SelectOp::attachInterface<SelectOpInterface>(*ctx);
43
});
44
}
BufferViewFlowOpInterfaceImpl.h
BufferViewFlowOpInterface.h
mlir::DialectRegistry
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
Definition:
DialectRegistry.h:139
mlir::DialectRegistry::addExtension
bool addExtension(TypeID extensionID, std::unique_ptr< DialectExtensionBase > extension)
Add the given extension to the registry.
Definition:
DialectRegistry.h:211
mlir::MLIRContext
MLIRContext is the top-level object for a collection of MLIR operations.
Definition:
MLIRContext.h:60
mlir::Operation
Operation is the basic unit of execution within MLIR.
Definition:
Operation.h:88
Arith.h
mlir::arith::registerBufferViewFlowOpInterfaceExternalModels
void registerBufferViewFlowOpInterfaceExternalModels(DialectRegistry ®istry)
Definition:
BufferViewFlowOpInterfaceImpl.cpp:39
mlir::bufferization
Definition:
BufferDeallocationOpInterface.h:18
mlir::bufferization::RegisterDependenciesFn
std::function< void(ValueRange, ValueRange)> RegisterDependenciesFn
Definition:
BufferViewFlowOpInterface.h:20
mlir
Include the generated interface declarations.
Definition:
LocalAliasAnalysis.h:20
Generated on Sun May 18 2025 12:33:55 for MLIR by
1.9.1