Skip to content

Commit

Permalink
Use std::nullopt instead of llvm::None.
Browse files Browse the repository at this point in the history
llvm::None has been deprecated by bd6a170 in the LLVM mono repo.
  • Loading branch information
ingomueller-net committed Jan 21, 2023
1 parent 03bb117 commit 69aca2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/Dialect/VectorExt/IR/VectorExtOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void mlir::vector_ext::buildTerminatedBody(OpBuilder &builder, Location loc) {
void PredicateOp::build(OpBuilder &builder, OperationState &result,
Value predicateMask, ValueRange indices,
Value incomingMask) {
build(builder, result, /*resultTypes=*/llvm::None, predicateMask, indices,
build(builder, result, /*resultTypes=*/std::nullopt, predicateMask, indices,
incomingMask);
}

Expand Down Expand Up @@ -115,7 +115,7 @@ void mlir::vector_ext::PredicateOp::print(OpAsmPrinter &p) {
p.printOptionalAttrDict(getOperation()->getAttrs());
}

/// Given the region at `index`, or the parent operation if `index` is None,
/// Given the region at `index`, or the parent operation if `index` is nullopt,
/// return the successor regions. These are the regions that may be selected
/// during the flow of control. `operands` is a set of optional attributes that
/// correspond to a constant value for each operand, or null if that operand is
Expand Down
4 changes: 2 additions & 2 deletions lib/Dialect/VectorExt/Transform/VectorMaskingUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Optional<PredicateOp> mlir::vector_ext::predicateOp(
Optional<Value> maybeIncomingMask) {
// TODO: Support multi-block regions.
if (!regionToPredicate->hasOneBlock())
return llvm::None;
return std::nullopt;

// Compute the range of operations that will be moved within vector.predicate
// and the definitions within the range with users outside the range.
Expand All @@ -95,7 +95,7 @@ Optional<PredicateOp> mlir::vector_ext::predicateOp(
builder.setInsertionPointToStart(&blockToPredicate);
Value predicateMask = createPredicateMask(builder);
if (!predicateMask)
return llvm::None;
return std::nullopt;

// Generate the vector.predicate operation and move 'opsToMove' within its
// truePredicateRegion. We have to rewire the def-use chain for those
Expand Down

0 comments on commit 69aca2c

Please sign in to comment.