Skip to content

Commit 9d0822f

Browse files
committed
implicitbuilder
1 parent 949f3a1 commit 9d0822f

File tree

84 files changed

+351
-240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+351
-240
lines changed

flang/include/flang/Optimizer/Dialect/FIROps.td

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3624,11 +3624,11 @@ def fir_LocalitySpecifierOp : fir_Op<"local", [IsolatedFromAbove]> {
36243624
attr-dict
36253625
}];
36263626

3627-
let builders = [
3628-
OpBuilder<(ins CArg<"mlir::TypeRange">:$result,
3629-
CArg<"mlir::StringAttr">:$sym_name,
3630-
CArg<"mlir::TypeAttr">:$type)>
3631-
];
3627+
// let builders = [
3628+
// OpBuilder<(ins CArg<"mlir::TypeRange">:$result,
3629+
// CArg<"mlir::StringAttr">:$sym_name,
3630+
// CArg<"mlir::TypeAttr">:$type)>
3631+
// ];
36323632

36333633
let extraClassDeclaration = [{
36343634
mlir::BlockArgument getInitMoldArg() {

flang/lib/Optimizer/Dialect/CUF/CUFOps.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "mlir/IR/BuiltinAttributes.h"
2222
#include "mlir/IR/BuiltinOps.h"
2323
#include "mlir/IR/Diagnostics.h"
24+
#include "mlir/IR/ImplicitLocOpBuilder.h"
2425
#include "mlir/IR/Matchers.h"
2526
#include "mlir/IR/OpDefinition.h"
2627
#include "mlir/IR/PatternMatch.h"

flang/lib/Optimizer/Dialect/FIRCG/CGOps.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#include "flang/Optimizer/Dialect/FIRCG/CGOps.h"
1414
#include "flang/Optimizer/Dialect/FIRDialect.h"
15+
#include "mlir/IR/ImplicitLocOpBuilder.h"
1516
#include "flang/Optimizer/Dialect/FIROps.h"
1617
#include "flang/Optimizer/Dialect/FIRType.h"
1718

flang/lib/Optimizer/Dialect/FIROps.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "mlir/IR/BuiltinAttributes.h"
2727
#include "mlir/IR/BuiltinOps.h"
2828
#include "mlir/IR/Diagnostics.h"
29+
#include "mlir/IR/ImplicitLocOpBuilder.h"
2930
#include "mlir/IR/Matchers.h"
3031
#include "mlir/IR/OpDefinition.h"
3132
#include "mlir/IR/PatternMatch.h"

flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "mlir/IR/BuiltinAttributes.h"
2121
#include "mlir/IR/BuiltinTypes.h"
2222
#include "mlir/IR/DialectImplementation.h"
23+
#include "mlir/IR/ImplicitLocOpBuilder.h"
2324
#include "mlir/IR/Matchers.h"
2425
#include "mlir/IR/OpImplementation.h"
2526
#include "llvm/ADT/APInt.h"

mlir/examples/toy/Ch2/mlir/Dialect.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "mlir/IR/Attributes.h"
1717
#include "mlir/IR/Builders.h"
1818
#include "mlir/IR/BuiltinTypes.h"
19+
#include "mlir/IR/ImplicitLocOpBuilder.h"
1920
#include "mlir/IR/OpImplementation.h"
2021
#include "mlir/IR/Operation.h"
2122
#include "mlir/IR/OperationSupport.h"
@@ -144,7 +145,8 @@ void ConstantOp::print(mlir::OpAsmPrinter &printer) {
144145
llvm::LogicalResult ConstantOp::verify() {
145146
// If the return type of the constant is not an unranked tensor, the shape
146147
// must match the shape of the attribute holding the data.
147-
auto resultType = llvm::dyn_cast<mlir::RankedTensorType>(getResult().getType());
148+
auto resultType =
149+
llvm::dyn_cast<mlir::RankedTensorType>(getResult().getType());
148150
if (!resultType)
149151
return success();
150152

@@ -280,7 +282,8 @@ llvm::LogicalResult ReturnOp::verify() {
280282
auto resultType = results.front();
281283

282284
// Check that the result type of the function matches the operand type.
283-
if (inputType == resultType || llvm::isa<mlir::UnrankedTensorType>(inputType) ||
285+
if (inputType == resultType ||
286+
llvm::isa<mlir::UnrankedTensorType>(inputType) ||
284287
llvm::isa<mlir::UnrankedTensorType>(resultType))
285288
return mlir::success();
286289

mlir/examples/toy/Ch3/mlir/Dialect.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "mlir/IR/Attributes.h"
1717
#include "mlir/IR/Builders.h"
1818
#include "mlir/IR/BuiltinTypes.h"
19+
#include "mlir/IR/ImplicitLocOpBuilder.h"
1920
#include "mlir/IR/OpImplementation.h"
2021
#include "mlir/IR/Operation.h"
2122
#include "mlir/IR/OperationSupport.h"
@@ -144,7 +145,8 @@ void ConstantOp::print(mlir::OpAsmPrinter &printer) {
144145
llvm::LogicalResult ConstantOp::verify() {
145146
// If the return type of the constant is not an unranked tensor, the shape
146147
// must match the shape of the attribute holding the data.
147-
auto resultType = llvm::dyn_cast<mlir::RankedTensorType>(getResult().getType());
148+
auto resultType =
149+
llvm::dyn_cast<mlir::RankedTensorType>(getResult().getType());
148150
if (!resultType)
149151
return success();
150152

@@ -280,7 +282,8 @@ llvm::LogicalResult ReturnOp::verify() {
280282
auto resultType = results.front();
281283

282284
// Check that the result type of the function matches the operand type.
283-
if (inputType == resultType || llvm::isa<mlir::UnrankedTensorType>(inputType) ||
285+
if (inputType == resultType ||
286+
llvm::isa<mlir::UnrankedTensorType>(inputType) ||
284287
llvm::isa<mlir::UnrankedTensorType>(resultType))
285288
return mlir::success();
286289

mlir/examples/toy/Ch4/mlir/Dialect.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "mlir/IR/Attributes.h"
1717
#include "mlir/IR/Builders.h"
1818
#include "mlir/IR/BuiltinTypes.h"
19+
#include "mlir/IR/ImplicitLocOpBuilder.h"
1920
#include "mlir/IR/Location.h"
2021
#include "mlir/IR/OpImplementation.h"
2122
#include "mlir/IR/OperationSupport.h"
@@ -206,7 +207,8 @@ void ConstantOp::print(mlir::OpAsmPrinter &printer) {
206207
llvm::LogicalResult ConstantOp::verify() {
207208
// If the return type of the constant is not an unranked tensor, the shape
208209
// must match the shape of the attribute holding the data.
209-
auto resultType = llvm::dyn_cast<mlir::RankedTensorType>(getResult().getType());
210+
auto resultType =
211+
llvm::dyn_cast<mlir::RankedTensorType>(getResult().getType());
210212
if (!resultType)
211213
return success();
212214

@@ -395,7 +397,8 @@ llvm::LogicalResult ReturnOp::verify() {
395397
auto resultType = results.front();
396398

397399
// Check that the result type of the function matches the operand type.
398-
if (inputType == resultType || llvm::isa<mlir::UnrankedTensorType>(inputType) ||
400+
if (inputType == resultType ||
401+
llvm::isa<mlir::UnrankedTensorType>(inputType) ||
399402
llvm::isa<mlir::UnrankedTensorType>(resultType))
400403
return mlir::success();
401404

mlir/examples/toy/Ch5/mlir/Dialect.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "mlir/IR/Attributes.h"
1717
#include "mlir/IR/Builders.h"
1818
#include "mlir/IR/BuiltinTypes.h"
19+
#include "mlir/IR/ImplicitLocOpBuilder.h"
1920
#include "mlir/IR/Location.h"
2021
#include "mlir/IR/OpImplementation.h"
2122
#include "mlir/IR/OperationSupport.h"
@@ -206,7 +207,8 @@ void ConstantOp::print(mlir::OpAsmPrinter &printer) {
206207
llvm::LogicalResult ConstantOp::verify() {
207208
// If the return type of the constant is not an unranked tensor, the shape
208209
// must match the shape of the attribute holding the data.
209-
auto resultType = llvm::dyn_cast<mlir::RankedTensorType>(getResult().getType());
210+
auto resultType =
211+
llvm::dyn_cast<mlir::RankedTensorType>(getResult().getType());
210212
if (!resultType)
211213
return success();
212214

@@ -395,7 +397,8 @@ llvm::LogicalResult ReturnOp::verify() {
395397
auto resultType = results.front();
396398

397399
// Check that the result type of the function matches the operand type.
398-
if (inputType == resultType || llvm::isa<mlir::UnrankedTensorType>(inputType) ||
400+
if (inputType == resultType ||
401+
llvm::isa<mlir::UnrankedTensorType>(inputType) ||
399402
llvm::isa<mlir::UnrankedTensorType>(resultType))
400403
return mlir::success();
401404

mlir/examples/toy/Ch6/mlir/Dialect.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "mlir/IR/Attributes.h"
1717
#include "mlir/IR/Builders.h"
1818
#include "mlir/IR/BuiltinTypes.h"
19+
#include "mlir/IR/ImplicitLocOpBuilder.h"
1920
#include "mlir/IR/Location.h"
2021
#include "mlir/IR/OpImplementation.h"
2122
#include "mlir/IR/OperationSupport.h"
@@ -206,7 +207,8 @@ void ConstantOp::print(mlir::OpAsmPrinter &printer) {
206207
llvm::LogicalResult ConstantOp::verify() {
207208
// If the return type of the constant is not an unranked tensor, the shape
208209
// must match the shape of the attribute holding the data.
209-
auto resultType = llvm::dyn_cast<mlir::RankedTensorType>(getResult().getType());
210+
auto resultType =
211+
llvm::dyn_cast<mlir::RankedTensorType>(getResult().getType());
210212
if (!resultType)
211213
return success();
212214

@@ -395,7 +397,8 @@ llvm::LogicalResult ReturnOp::verify() {
395397
auto resultType = results.front();
396398

397399
// Check that the result type of the function matches the operand type.
398-
if (inputType == resultType || llvm::isa<mlir::UnrankedTensorType>(inputType) ||
400+
if (inputType == resultType ||
401+
llvm::isa<mlir::UnrankedTensorType>(inputType) ||
399402
llvm::isa<mlir::UnrankedTensorType>(resultType))
400403
return mlir::success();
401404

0 commit comments

Comments
 (0)