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
a
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
Transform
Transforms
PreloadLibraryPass.cpp
Go to the documentation of this file.
1
//===- PreloadLibraryPass.cpp - Pass to preload a transform library -------===//
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/Transform/IR/TransformDialect.h
"
10
#include "
mlir/Dialect/Transform/Transforms/Passes.h
"
11
#include "
mlir/Dialect/Transform/Transforms/TransformInterpreterUtils.h
"
12
13
using namespace
mlir
;
14
15
namespace
mlir
{
16
namespace
transform {
17
#define GEN_PASS_DEF_PRELOADLIBRARYPASS
18
#include "mlir/Dialect/Transform/Transforms/Passes.h.inc"
19
}
// namespace transform
20
}
// namespace mlir
21
22
namespace
{
23
class
PreloadLibraryPass
24
:
public
transform::impl::PreloadLibraryPassBase<PreloadLibraryPass> {
25
public
:
26
using
Base::Base;
27
28
void
runOnOperation()
override
{
29
OwningOpRef<ModuleOp>
mergedParsedLibraries;
30
if
(failed(
transform::detail::assembleTransformLibraryFromPaths
(
31
&
getContext
(), transformLibraryPaths, mergedParsedLibraries)))
32
return
signalPassFailure();
33
// TODO: investigate using a resource blob if some ownership mode allows it.
34
auto
*dialect =
35
getContext
().
getOrLoadDialect
<transform::TransformDialect>();
36
if
(failed(
37
dialect->loadIntoLibraryModule(std::move(mergedParsedLibraries))))
38
signalPassFailure();
39
}
40
};
41
}
// namespace
Passes.h
getContext
static MLIRContext * getContext(OpFoldResult val)
Definition:
IndexingUtils.cpp:295
TransformDialect.h
TransformInterpreterUtils.h
mlir::MLIRContext::getOrLoadDialect
T * getOrLoadDialect()
Get (or create) a dialect for the given derived dialect type.
Definition:
MLIRContext.h:97
mlir::OwningOpRef< ModuleOp >
mlir::transform::detail::assembleTransformLibraryFromPaths
LogicalResult assembleTransformLibraryFromPaths(MLIRContext *context, ArrayRef< std::string > transformLibraryPaths, OwningOpRef< ModuleOp > &transformModule)
Utility to parse, verify, aggregate and link the content of all mlir files nested under transformLibr...
Definition:
TransformInterpreterUtils.cpp:152
mlir
Include the generated interface declarations.
Definition:
LocalAliasAnalysis.h:20
Generated on Thu May 1 2025 08:33:07 for MLIR by
1.9.1