Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit 9ad86d3

Browse files
author
Ivan Butygin
authored
Update to mlir master (#201)
1 parent bf8a729 commit 9ad86d3

File tree

6 files changed

+22
-23
lines changed

6 files changed

+22
-23
lines changed

mlir-compiler/llvm-sha.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7d09e1d7cf27ce781e83f9d388a7a3e1e6487ead
1+
7b153b43d3a14d76975039408c4b922beb576735

mlir-compiler/mlir-compiler/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
5858
LLVMTarget
5959
MLIRIR
6060
MLIRLLVMIR
61-
MLIRTargetLLVMIR
61+
MLIRLLVMToLLVMIRTranslation
6262
MLIRTransforms
6363
MLIRStandardOpsTransforms
6464
MLIRLinalgTransforms

mlir-compiler/mlir-compiler/src/lowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#include <mlir/IR/BuiltinTypes.h>
1313
#include <mlir/Dialect/StandardOps/IR/Ops.h>
1414

15-
#include <mlir/Target/LLVMIR.h>
1615
#include <mlir/Target/LLVMIR/Export.h>
16+
#include <mlir/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.h>
1717

1818
#include <llvm/Bitcode/BitcodeWriter.h>
1919

mlir-compiler/mlir-compiler/src/pipelines/lower_to_llvm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ struct ApplyFastmathFlags : public mlir::OpRewritePattern<Op>
587587
});
588588
if (changed)
589589
{
590-
op.fastmathFlagsAttr(mlir::LLVM::FMFAttr::get(fmf, op.getContext()));
590+
op.fastmathFlagsAttr(mlir::LLVM::FMFAttr::get(op.getContext(), fmf));
591591
rewriter.finalizeRootUpdate(op);
592592
}
593593
else

mlir-compiler/plier/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ target_compile_definitions(${PLIER_LIB} PRIVATE ${LLVM_DEFINITIONS})
7070
target_link_libraries(${PLIER_LIB} PRIVATE
7171
MLIRIR
7272
MLIRLLVMIR
73-
MLIRTargetLLVMIR
7473
MLIRTransforms
7574
MLIRStandardOpsTransforms
7675
MLIRLinalgTransforms

mlir-compiler/plier/include/plier/PlierOps.td

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def ArgOp : Plier_Op<"arg", [NoSideEffect]> {
2828
let hasFolder = 1;
2929

3030
let builders = [
31-
OpBuilderDAG<(ins "unsigned":$index, "::mlir::StringRef":$name)>
31+
OpBuilder<(ins "unsigned":$index, "::mlir::StringRef":$name)>
3232
];
3333
}
3434

@@ -39,7 +39,7 @@ def ConstOp : Plier_Op<"const", [NoSideEffect]> {
3939
let results = (outs AnyType);
4040

4141
let builders = [
42-
OpBuilderDAG<(ins "::mlir::Attribute":$val)>
42+
OpBuilder<(ins "::mlir::Attribute":$val)>
4343
];
4444
}
4545

@@ -50,7 +50,7 @@ def GlobalOp : Plier_Op<"global", [NoSideEffect]> {
5050
let results = (outs AnyType);
5151

5252
let builders = [
53-
OpBuilderDAG<(ins "::mlir::StringRef":$name)>
53+
OpBuilder<(ins "::mlir::StringRef":$name)>
5454
];
5555
}
5656

@@ -63,7 +63,7 @@ def BinOp : Plier_Op<"binop", []> {
6363
let results = (outs AnyType);
6464

6565
let builders = [
66-
OpBuilderDAG<(ins "::mlir::Value":$lhs, "::mlir::Value":$rhs, "::mlir::StringRef ":$op)>
66+
OpBuilder<(ins "::mlir::Value":$lhs, "::mlir::Value":$rhs, "::mlir::StringRef ":$op)>
6767
];
6868
}
6969

@@ -75,7 +75,7 @@ def UnaryOp : Plier_Op<"unary", []> {
7575
let results = (outs AnyType);
7676

7777
let builders = [
78-
OpBuilderDAG<(ins "::mlir::Value":$value, "::mlir::StringRef ":$op)>
78+
OpBuilder<(ins "::mlir::Value":$value, "::mlir::StringRef ":$op)>
7979
];
8080
}
8181

@@ -98,7 +98,7 @@ def PyCallOp : Plier_Op<"call", []> {
9898
let results = (outs AnyType);
9999

100100
let builders = [
101-
OpBuilderDAG<(ins "::mlir::Value":$func, "::mlir::StringRef":$func_name,
101+
OpBuilder<(ins "::mlir::Value":$func, "::mlir::StringRef":$func_name,
102102
"::mlir::ValueRange":$args,
103103
"::mlir::ArrayRef<std::pair<std::string, ::mlir::Value>>":$kwargs)>
104104
];
@@ -111,7 +111,7 @@ def BuildTupleOp : Plier_Op<"build_tuple", [NoSideEffect]> {
111111
let results = (outs AnyType);
112112

113113
let builders = [
114-
OpBuilderDAG<(ins "::mlir::ValueRange":$args)>
114+
OpBuilder<(ins "::mlir::ValueRange":$args)>
115115
];
116116
}
117117

@@ -124,7 +124,7 @@ def GetItemOp : Plier_Op<"getitem", []> {
124124
let hasFolder = 1;
125125

126126
let builders = [
127-
OpBuilderDAG<(ins "::mlir::Value":$value, "::mlir::Value":$index)>
127+
OpBuilder<(ins "::mlir::Value":$value, "::mlir::Value":$index)>
128128
];
129129
}
130130

@@ -138,7 +138,7 @@ def StaticGetItemOp : Plier_Op<"static_getitem", []> {
138138
let hasFolder = 1;
139139

140140
let builders = [
141-
OpBuilderDAG<(ins "::mlir::Value":$value, "::mlir::Value":$index_var, "unsigned":$index)>
141+
OpBuilder<(ins "::mlir::Value":$value, "::mlir::Value":$index_var, "unsigned":$index)>
142142
];
143143
}
144144

@@ -158,7 +158,7 @@ def GetiterOp : Plier_Op<"getiter", [NoSideEffect]> {
158158
let results = (outs AnyType);
159159

160160
let builders = [
161-
OpBuilderDAG<(ins "::mlir::Value":$value)>
161+
OpBuilder<(ins "::mlir::Value":$value)>
162162
];
163163
}
164164

@@ -169,7 +169,7 @@ def IternextOp : Plier_Op<"iternext", []> {
169169
let results = (outs AnyType);
170170

171171
let builders = [
172-
OpBuilderDAG<(ins "::mlir::Value":$value)>
172+
OpBuilder<(ins "::mlir::Value":$value)>
173173
];
174174
}
175175

@@ -180,7 +180,7 @@ def PairfirstOp : Plier_Op<"pair_first", [NoSideEffect]> {
180180
let results = (outs AnyType);
181181

182182
let builders = [
183-
OpBuilderDAG<(ins "::mlir::Value":$value)>
183+
OpBuilder<(ins "::mlir::Value":$value)>
184184
];
185185
}
186186

@@ -191,7 +191,7 @@ def PairsecondOp : Plier_Op<"pair_second", [NoSideEffect]> {
191191
let results = (outs AnyType);
192192

193193
let builders = [
194-
OpBuilderDAG<(ins "::mlir::Value":$value)>
194+
OpBuilder<(ins "::mlir::Value":$value)>
195195
];
196196
}
197197

@@ -210,7 +210,7 @@ def GetattrOp : Plier_Op<"getattr", [NoSideEffect]> {
210210
let hasCanonicalizer = 1;
211211

212212
let builders = [
213-
OpBuilderDAG<(ins "::mlir::Value":$value, "::mlir::StringRef":$name)>
213+
OpBuilder<(ins "::mlir::Value":$value, "::mlir::StringRef":$name)>
214214
];
215215
}
216216

@@ -221,7 +221,7 @@ def EnforceShapeOp : Plier_Op<"enforce_shape"> {
221221
let results = (outs AnyRankedTensor:$result);
222222

223223
let builders = [
224-
OpBuilderDAG<(ins "::mlir::Value":$value, "::mlir::ValueRange":$shape)>
224+
OpBuilder<(ins "::mlir::Value":$value, "::mlir::ValueRange":$shape)>
225225
];
226226

227227
let hasFolder = 1;
@@ -234,7 +234,7 @@ def RetainOp : Plier_Op<"retain"> {
234234
let results = (outs Res<AnyMemRef, "", [MemAlloc<DefaultResource>]>:$memref);
235235

236236
let builders = [
237-
OpBuilderDAG<(ins "::mlir::Value":$value)>
237+
OpBuilder<(ins "::mlir::Value":$value)>
238238
];
239239
}
240240

@@ -251,7 +251,7 @@ def ParallelOp : Plier_Op<"parallel",
251251

252252
let skipDefaultBuilders = 1;
253253
let builders = [
254-
OpBuilderDAG<(ins "::mlir::ValueRange":$lowerBounds, "::mlir::ValueRange":$upperBounds, "::mlir::ValueRange":$steps,
254+
OpBuilder<(ins "::mlir::ValueRange":$lowerBounds, "::mlir::ValueRange":$upperBounds, "::mlir::ValueRange":$steps,
255255
CArg<"::mlir::function_ref<void(::mlir::OpBuilder &, ::mlir::Location, ::mlir::ValueRange, ::mlir::ValueRange, ::mlir::Value)>",
256256
"nullptr">)>
257257
];
@@ -264,7 +264,7 @@ def ParallelOp : Plier_Op<"parallel",
264264
def YieldOp : Plier_Op<"yield", [NoSideEffect, ReturnLike, Terminator,
265265
ParentOneOf<["ParallelOp"]>]> {
266266
let arguments = (ins Variadic<AnyType>:$results);
267-
let builders = [OpBuilderDAG<(ins), [{ /* nothing to do */ }]>];
267+
let builders = [OpBuilder<(ins), [{ /* nothing to do */ }]>];
268268
// Override default verifier (defined in SCF_Op), no custom verification
269269
// needed.
270270
let verifier = ?;

0 commit comments

Comments
 (0)