[Mlir-commits] [mlir] 98b1397 - Apply clang-tidy fixes for readability-identifier-naming in AsyncToAsyncRuntime.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Mon Dec 12 23:16:41 PST 2022
Author: Mehdi Amini
Date: 2022-12-13T07:16:23Z
New Revision: 98b13979fb05f3ed288a900deb843e7b27589e58
URL: https://github.com/llvm/llvm-project/commit/98b13979fb05f3ed288a900deb843e7b27589e58
DIFF: https://github.com/llvm/llvm-project/commit/98b13979fb05f3ed288a900deb843e7b27589e58.diff
LOG: Apply clang-tidy fixes for readability-identifier-naming in AsyncToAsyncRuntime.cpp (NFC)
Added:
Modified:
mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
Removed:
################################################################################
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 @@ class AsyncFuncOpLowering : public OpConversionPattern<async::FuncOp> {
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 @@ class AsyncFuncOpLowering : public OpConversionPattern<async::FuncOp> {
}
private:
- FuncCoroMapPtr coros_;
+ FuncCoroMapPtr coros;
};
//===----------------------------------------------------------------------===//
@@ -476,14 +476,14 @@ class AsyncCallOpLowering : public OpConversionPattern<async::CallOp> {
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 @@ class AsyncReturnOpLowering : public OpConversionPattern<async::ReturnOp> {
}
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 @@ class AwaitOpLoweringBase : public OpConversionPattern<AwaitType> {
// 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 @@ class AwaitOpLoweringBase : public OpConversionPattern<AwaitType> {
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 @@ class AwaitOpLoweringBase : public OpConversionPattern<AwaitType> {
}
private:
- FuncCoroMapPtr coros_;
- bool should_lower_blocking_wait_;
+ FuncCoroMapPtr coros;
+ bool shouldLowerBlockingWait;
};
/// Lowering for `async.await` with a token operand.
@@ -668,15 +668,15 @@ class AwaitAllOpLowering : public AwaitOpLoweringBase<AwaitAllOp, GroupType> {
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 @@ class YieldOpLowering : public OpConversionPattern<async::YieldOp> {
}
private:
- FuncCoroMapPtr coros_;
+ FuncCoroMapPtr coros;
};
//===----------------------------------------------------------------------===//
@@ -713,15 +713,15 @@ class YieldOpLowering : public OpConversionPattern<async::YieldOp> {
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 @@ class AssertOpLowering : public OpConversionPattern<cf::AssertOp> {
}
private:
- FuncCoroMapPtr coros_;
+ FuncCoroMapPtr coros;
};
//===----------------------------------------------------------------------===//
More information about the Mlir-commits
mailing list