Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/lib/ASTMatchers/Dynamic/Marshallers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ makeMatcherAutoMarshall(ReturnType (*Func)(), StringRef MatcherName) {
BuildReturnTypeVector<ReturnType>::build(RetTypes);
return std::make_unique<FixedArgCountMatcherDescriptor>(
matcherMarshall0<ReturnType>, reinterpret_cast<void (*)()>(Func),
MatcherName, RetTypes, std::nullopt);
MatcherName, RetTypes, ArrayRef<ArgKind>());
}

/// 1-arg overload
Expand Down
2 changes: 1 addition & 1 deletion mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ void PDLToPDLInterpPass::runOnOperation() {
module.getLoc(), pdl_interp::PDLInterpDialect::getMatcherFunctionName(),
builder.getFunctionType(builder.getType<pdl::OperationType>(),
/*results=*/{}),
/*attrs=*/std::nullopt);
/*attrs=*/ArrayRef<NamedAttribute>());

// Create a nested module to hold the functions invoked for rewriting the IR
// after a successful match.
Expand Down
16 changes: 8 additions & 8 deletions mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ static Value createLinalgBodyCalculationForElementwiseOp(
auto shifted =
rewriter.create<arith::ShRSIOp>(loc, resultTypes, args[0], subtract)
->getResults();
auto truncated =
rewriter.create<arith::TruncIOp>(loc, i1Ty, shifted, std::nullopt);
auto truncated = rewriter.create<arith::TruncIOp>(
loc, i1Ty, shifted, ArrayRef<NamedAttribute>());
auto isInputOdd =
rewriter.create<arith::AndIOp>(loc, i1Ty, truncated, i1one);

Expand Down Expand Up @@ -552,20 +552,20 @@ static Value createLinalgBodyCalculationForElementwiseOp(

if (isa<FloatType>(srcTy) && isa<FloatType>(dstTy) && bitExtend)
return rewriter.create<arith::ExtFOp>(loc, resultTypes, args,
std::nullopt);
ArrayRef<NamedAttribute>());

if (isa<FloatType>(srcTy) && isa<FloatType>(dstTy) && !bitExtend)
return rewriter.create<arith::TruncFOp>(loc, resultTypes, args,
std::nullopt);
ArrayRef<NamedAttribute>());

// 1-bit integers need to be treated as signless.
if (srcTy.isInteger(1) && arith::UIToFPOp::areCastCompatible(srcTy, dstTy))
return rewriter.create<arith::UIToFPOp>(loc, resultTypes, args,
std::nullopt);
ArrayRef<NamedAttribute>());

if (srcTy.isInteger(1) && isa<IntegerType>(dstTy) && bitExtend)
return rewriter.create<arith::ExtUIOp>(loc, resultTypes, args,
std::nullopt);
ArrayRef<NamedAttribute>());

// Unsigned integers need an unrealized cast so that they can be passed
// to UIToFP.
Expand All @@ -583,7 +583,7 @@ static Value createLinalgBodyCalculationForElementwiseOp(
// All other si-to-fp conversions should be handled by SIToFP.
if (arith::SIToFPOp::areCastCompatible(srcTy, dstTy))
return rewriter.create<arith::SIToFPOp>(loc, resultTypes, args,
std::nullopt);
ArrayRef<NamedAttribute>());

// Casting to boolean, floats need to only be checked as not-equal to zero.
if (isa<FloatType>(srcTy) && dstTy.isInteger(1)) {
Expand Down Expand Up @@ -690,7 +690,7 @@ static Value createLinalgBodyCalculationForElementwiseOp(

if (isa<IntegerType>(srcTy) && isa<IntegerType>(dstTy) && bitExtend)
return rewriter.create<arith::ExtSIOp>(loc, resultTypes, args,
std::nullopt);
ArrayRef<NamedAttribute>());

if (isa<IntegerType>(srcTy) && isa<IntegerType>(dstTy) && !bitExtend) {
return rewriter.create<arith::TruncIOp>(loc, dstTy, args[0]);
Expand Down
3 changes: 2 additions & 1 deletion mlir/lib/Dialect/GPU/Transforms/DecomposeMemRefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ static Value getFlatMemref(OpBuilder &rewriter, Location loc, Value source,
getFlatOffsetAndStrides(rewriter, loc, source, offsetsTemp);
MemRefType retType = inferCastResultType(base, offset);
return rewriter.create<memref::ReinterpretCastOp>(loc, retType, base, offset,
std::nullopt, std::nullopt);
ArrayRef<OpFoldResult>(),
ArrayRef<OpFoldResult>());
}

static bool needFlatten(Value val) {
Expand Down
5 changes: 3 additions & 2 deletions mlir/lib/Tools/PDLL/CodeGen/MLIRGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,9 @@ Value CodeGen::genNonInitializerVar(const ast::VariableDecl *varDecl,
Value results = builder.create<pdl::TypesOp>(
loc, pdl::RangeType::get(builder.getType<pdl::TypeType>()),
/*types=*/ArrayAttr());
return builder.create<pdl::OperationOp>(
loc, opType.getName(), operands, std::nullopt, ValueRange(), results);
return builder.create<pdl::OperationOp>(loc, opType.getName(), operands,
ArrayRef<StringRef>(), ValueRange(),
results);
}

if (ast::RangeType rangeTy = dyn_cast<ast::RangeType>(type)) {
Expand Down
4 changes: 2 additions & 2 deletions mlir/test/lib/Dialect/Test/TestPatterns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ struct TestPassthroughInvalidOp : public ConversionPattern {
.getResult());
}
rewriter.replaceOpWithNewOp<TestValidOp>(op, TypeRange(), flattened,
std::nullopt);
ArrayRef<NamedAttribute>());
return success();
}
};
Expand All @@ -1030,7 +1030,7 @@ struct TestDropAndReplaceInvalidOp : public ConversionPattern {
matchAndRewrite(Operation *op, ArrayRef<Value> operands,
ConversionPatternRewriter &rewriter) const final {
rewriter.replaceOpWithNewOp<TestValidOp>(op, TypeRange(), ValueRange(),
std::nullopt);
ArrayRef<NamedAttribute>());
return success();
}
};
Expand Down
Loading