summaryrefslogtreecommitdiff
path: root/mlir
diff options
context:
space:
mode:
authorMehdi Amini <joker.eph@gmail.com>2022-12-10 10:28:26 +0000
committerMehdi Amini <joker.eph@gmail.com>2022-12-13 07:16:23 +0000
commit98b13979fb05f3ed288a900deb843e7b27589e58 (patch)
tree31b494461a786f3e8b22cfe9aa603fb5f358868d /mlir
parent190cdf440ebf9e5be3d87daeceab7996a369fa78 (diff)
downloadllvm-98b13979fb05f3ed288a900deb843e7b27589e58.tar.gz
Apply clang-tidy fixes for readability-identifier-naming in AsyncToAsyncRuntime.cpp (NFC)
Diffstat (limited to 'mlir')
-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;
};
//===----------------------------------------------------------------------===//