diff options
Diffstat (limited to 'mlir/lib/Rewrite/ByteCode.cpp')
-rw-r--r-- | mlir/lib/Rewrite/ByteCode.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mlir/lib/Rewrite/ByteCode.cpp b/mlir/lib/Rewrite/ByteCode.cpp index 6b11220..1ea4bef 100644 --- a/mlir/lib/Rewrite/ByteCode.cpp +++ b/mlir/lib/Rewrite/ByteCode.cpp @@ -487,13 +487,13 @@ struct ByteCodeLiveRange { std::unique_ptr<llvm::IntervalMap<uint64_t, char, 16>> liveness; /// The operation range storage index for this range. - Optional<unsigned> opRangeIndex; + std::optional<unsigned> opRangeIndex; /// The type range storage index for this range. - Optional<unsigned> typeRangeIndex; + std::optional<unsigned> typeRangeIndex; /// The value range storage index for this range. - Optional<unsigned> valueRangeIndex; + std::optional<unsigned> valueRangeIndex; }; } // namespace @@ -1107,7 +1107,7 @@ public: LogicalResult execute(PatternRewriter &rewriter, SmallVectorImpl<PDLByteCode::MatchResult> *matches = nullptr, - Optional<Location> mainRewriteLoc = {}); + std::optional<Location> mainRewriteLoc = {}); private: /// Internal implementation of executing each of the bytecode commands. @@ -1450,11 +1450,11 @@ LogicalResult ByteCodeExecutor::executeApplyRewrite(PatternRewriter &rewriter) { // If the result is a range, we need to copy it over to the bytecodes // range memory. - if (Optional<TypeRange> typeRange = result.dyn_cast<TypeRange>()) { + if (std::optional<TypeRange> typeRange = result.dyn_cast<TypeRange>()) { unsigned rangeIndex = read(); typeRangeMemory[rangeIndex] = *typeRange; memory[read()] = &typeRangeMemory[rangeIndex]; - } else if (Optional<ValueRange> valueRange = + } else if (std::optional<ValueRange> valueRange = result.dyn_cast<ValueRange>()) { unsigned rangeIndex = read(); valueRangeMemory[rangeIndex] = *valueRange; @@ -2110,7 +2110,7 @@ void ByteCodeExecutor::executeSwitchTypes() { LogicalResult ByteCodeExecutor::execute(PatternRewriter &rewriter, SmallVectorImpl<PDLByteCode::MatchResult> *matches, - Optional<Location> mainRewriteLoc) { + std::optional<Location> mainRewriteLoc) { while (true) { // Print the location of the operation being executed. LLVM_DEBUG(llvm::dbgs() << readInline<Location>() << "\n"); |