summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp b/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
index 3845cd338d05..df6f1d80d7d2 100644
--- a/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
+++ b/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
@@ -418,7 +418,7 @@ namespace {
class AsyncFuncOpLowering : public OpConversionPattern<async::FuncOp> {
public:
AsyncFuncOpLowering(MLIRContext *ctx, FuncCoroMapPtr coros)
- : OpConversionPattern<async::FuncOp>(ctx), coros_(std::move(coros)) {}
+ : OpConversionPattern<async::FuncOp>(ctx), coros(std::move(coros)) {}
LogicalResult
matchAndRewrite(async::FuncOp op, OpAdaptor adaptor,
@@ -440,7 +440,7 @@ public:
newFuncOp.end());
CoroMachinery coro = setupCoroMachinery(newFuncOp);
- (*coros_)[newFuncOp] = coro;
+ (*coros)[newFuncOp] = coro;
// no initial suspend, we should hot-start
rewriter.eraseOp(op);
@@ -448,7 +448,7 @@ public:
}
private:
- FuncCoroMapPtr coros_;
+ FuncCoroMapPtr coros;
};
//===----------------------------------------------------------------------===//
@@ -476,14 +476,14 @@ public:
class AsyncReturnOpLowering : public OpConversionPattern<async::ReturnOp> {
public:
AsyncReturnOpLowering(MLIRContext *ctx, FuncCoroMapPtr coros)
- : OpConversionPattern<async::ReturnOp>(ctx), coros_(std::move(coros)) {}
+ : OpConversionPattern<async::ReturnOp>(ctx), coros(std::move(coros)) {}
LogicalResult
matchAndRewrite(async::ReturnOp op, OpAdaptor adaptor,
ConversionPatternRewriter &rewriter) const override {
auto func = op->template getParentOfType<func::FuncOp>();
- auto funcCoro = coros_->find(func);
- if (funcCoro == coros_->end())
+ auto funcCoro = coros->find(func);
+ if (funcCoro == coros->end())
return rewriter.notifyMatchFailure(
op, "operation is not inside the async coroutine function");
@@ -510,7 +510,7 @@ public:
}
private:
- FuncCoroMapPtr coros_;
+ FuncCoroMapPtr coros;
};
} // namespace
@@ -526,9 +526,9 @@ class AwaitOpLoweringBase : public OpConversionPattern<AwaitType> {
public:
AwaitOpLoweringBase(MLIRContext *ctx, FuncCoroMapPtr coros,
- bool should_lower_blocking_wait)
- : OpConversionPattern<AwaitType>(ctx), coros_(std::move(coros)),
- should_lower_blocking_wait_(should_lower_blocking_wait) {}
+ bool shouldLowerBlockingWait)
+ : OpConversionPattern<AwaitType>(ctx), coros(std::move(coros)),
+ shouldLowerBlockingWait(shouldLowerBlockingWait) {}
LogicalResult
matchAndRewrite(AwaitType op, typename AwaitType::Adaptor adaptor,
@@ -540,8 +540,8 @@ public:
// Check if await operation is inside the coroutine function.
auto func = op->template getParentOfType<func::FuncOp>();
- auto funcCoro = coros_->find(func);
- const bool isInCoroutine = funcCoro != coros_->end();
+ auto funcCoro = coros->find(func);
+ const bool isInCoroutine = funcCoro != coros->end();
Location loc = op->getLoc();
Value operand = adaptor.getOperand();
@@ -549,7 +549,7 @@ public:
Type i1 = rewriter.getI1Type();
// Delay lowering to block wait in case await op is inside async.execute
- if (!isInCoroutine && !should_lower_blocking_wait_)
+ if (!isInCoroutine && !shouldLowerBlockingWait)
return failure();
// Inside regular functions we use the blocking wait operation to wait for
@@ -623,8 +623,8 @@ public:
}
private:
- FuncCoroMapPtr coros_;
- bool should_lower_blocking_wait_;
+ FuncCoroMapPtr coros;
+ bool shouldLowerBlockingWait;
};
/// Lowering for `async.await` with a token operand.
@@ -668,15 +668,15 @@ public:
class YieldOpLowering : public OpConversionPattern<async::YieldOp> {
public:
YieldOpLowering(MLIRContext *ctx, FuncCoroMapPtr coros)
- : OpConversionPattern<async::YieldOp>(ctx), coros_(std::move(coros)) {}
+ : OpConversionPattern<async::YieldOp>(ctx), coros(std::move(coros)) {}
LogicalResult
matchAndRewrite(async::YieldOp op, OpAdaptor adaptor,
ConversionPatternRewriter &rewriter) const override {
// Check if yield operation is inside the async coroutine function.
auto func = op->template getParentOfType<func::FuncOp>();
- auto funcCoro = coros_->find(func);
- if (funcCoro == coros_->end())
+ auto funcCoro = coros->find(func);
+ if (funcCoro == coros->end())
return rewriter.notifyMatchFailure(
op, "operation is not inside the async coroutine function");
@@ -703,7 +703,7 @@ public:
}
private:
- FuncCoroMapPtr coros_;
+ FuncCoroMapPtr coros;
};
//===----------------------------------------------------------------------===//
@@ -713,15 +713,15 @@ private:
class AssertOpLowering : public OpConversionPattern<cf::AssertOp> {
public:
AssertOpLowering(MLIRContext *ctx, FuncCoroMapPtr coros)
- : OpConversionPattern<cf::AssertOp>(ctx), coros_(std::move(coros)) {}
+ : OpConversionPattern<cf::AssertOp>(ctx), coros(std::move(coros)) {}
LogicalResult
matchAndRewrite(cf::AssertOp op, OpAdaptor adaptor,
ConversionPatternRewriter &rewriter) const override {
// Check if assert operation is inside the async coroutine function.
auto func = op->template getParentOfType<func::FuncOp>();
- auto funcCoro = coros_->find(func);
- if (funcCoro == coros_->end())
+ auto funcCoro = coros->find(func);
+ if (funcCoro == coros->end())
return rewriter.notifyMatchFailure(
op, "operation is not inside the async coroutine function");
@@ -741,7 +741,7 @@ public:
}
private:
- FuncCoroMapPtr coros_;
+ FuncCoroMapPtr coros;
};
//===----------------------------------------------------------------------===//