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
x
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
include
mlir
Target
LLVMIR
TypeFromLLVM.h
Go to the documentation of this file.
1
//===- TypeFromLLVM.h - Translate types from LLVM to MLIR --*- C++ -*-===//
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
// This file declares the type translation function going from MLIR LLVM dialect
10
// to LLVM IR and back.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef MLIR_TARGET_LLVMIR_TYPEFROMLLVM_H
15
#define MLIR_TARGET_LLVMIR_TYPEFROMLLVM_H
16
17
#include <memory>
18
19
namespace
llvm
{
20
class
Type
;
21
}
// namespace llvm
22
23
namespace
mlir
{
24
25
class
Type
;
26
class
MLIRContext;
27
28
namespace
LLVM {
29
30
namespace
detail {
31
class
TypeFromLLVMIRTranslatorImpl;
32
}
// namespace detail
33
34
/// Utility class to translate LLVM IR types to the MLIR LLVM dialect. Stores
35
/// the translation state, in particular any identified structure types that are
36
/// reused across translations.
37
class
TypeFromLLVMIRTranslator
{
38
public
:
39
TypeFromLLVMIRTranslator
(
MLIRContext
&context,
40
bool
importStructsAsLiterals =
false
);
41
~TypeFromLLVMIRTranslator
();
42
43
/// Translates the given LLVM IR type to the MLIR LLVM dialect.
44
Type
translateType
(llvm::Type *type);
45
46
private
:
47
/// Private implementation.
48
std::unique_ptr<detail::TypeFromLLVMIRTranslatorImpl>
impl
;
49
};
50
51
}
// namespace LLVM
52
}
// namespace mlir
53
54
#endif
// MLIR_TARGET_LLVMIR_TYPEFROMLLVM_H
mlir::LLVM::TypeFromLLVMIRTranslator
Utility class to translate LLVM IR types to the MLIR LLVM dialect.
Definition:
TypeFromLLVM.h:37
mlir::LLVM::TypeFromLLVMIRTranslator::TypeFromLLVMIRTranslator
TypeFromLLVMIRTranslator(MLIRContext &context, bool importStructsAsLiterals=false)
Definition:
TypeFromLLVM.cpp:172
mlir::LLVM::TypeFromLLVMIRTranslator::translateType
Type translateType(llvm::Type *type)
Translates the given LLVM IR type to the MLIR LLVM dialect.
Definition:
TypeFromLLVM.cpp:179
mlir::LLVM::TypeFromLLVMIRTranslator::~TypeFromLLVMIRTranslator
~TypeFromLLVMIRTranslator()
mlir::MLIRContext
MLIRContext is the top-level object for a collection of MLIR operations.
Definition:
MLIRContext.h:60
mlir::Type
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
Definition:
Types.h:74
impl
Definition:
RunnerUtils.h:80
llvm
The OpAsmOpInterface, see OpAsmInterface.td for more details.
Definition:
CallGraph.h:229
mlir::lsp::InlayHintKind::Type
@ Type
An inlay hint that for a type annotation.
mlir
Include the generated interface declarations.
Definition:
LocalAliasAnalysis.h:20
Generated on Thu Jun 19 2025 20:33:14 for MLIR by
1.9.1