[Mlir-commits] [mlir] 1e7b48a - Apply clang-tidy fixes for readability-identifier-naming in OptimizeSharedMemory.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Tue Sep 6 03:02:59 PDT 2022
Author: Mehdi Amini
Date: 2022-09-06T09:59:30Z
New Revision: 1e7b48a6c330e274e4accbf065f494baec3b313c
URL: https://github.com/llvm/llvm-project/commit/1e7b48a6c330e274e4accbf065f494baec3b313c
DIFF: https://github.com/llvm/llvm-project/commit/1e7b48a6c330e274e4accbf065f494baec3b313c.diff
LOG: Apply clang-tidy fixes for readability-identifier-naming in OptimizeSharedMemory.cpp (NFC)
Added:
Modified:
mlir/lib/Dialect/NVGPU/Transforms/OptimizeSharedMemory.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/NVGPU/Transforms/OptimizeSharedMemory.cpp b/mlir/lib/Dialect/NVGPU/Transforms/OptimizeSharedMemory.cpp
index 968afcb4bef81..158e4697c8f39 100644
--- a/mlir/lib/Dialect/NVGPU/Transforms/OptimizeSharedMemory.cpp
+++ b/mlir/lib/Dialect/NVGPU/Transforms/OptimizeSharedMemory.cpp
@@ -67,12 +67,12 @@ static Value permuteVectorOffset(OpBuilder &b, Location loc,
// bits[0:N] = sub-vector element offset
// bits[N:M] = vector index
// clang-format on
- int64_t N =
+ int64_t n =
llvm::Log2_64(kDefaultVectorSizeBits / memrefTy.getElementTypeBitWidth());
- int64_t M = llvm::Log2_64(memrefTy.getDimSize(tgtDim));
+ int64_t m = llvm::Log2_64(memrefTy.getDimSize(tgtDim));
// Capture bits[0:(M-N)] of src by first creating a (M-N) mask.
- int64_t mask = (1LL << (M - N)) - 1;
+ int64_t mask = (1LL << (m - n)) - 1;
if (permuteEveryN > 1)
mask = mask << llvm::Log2_64(permuteEveryN);
Value srcBits = b.create<arith::ConstantIndexOp>(loc, mask);
@@ -81,7 +81,7 @@ static Value permuteVectorOffset(OpBuilder &b, Location loc,
// Use the src bits to permute the target bits b[N:M] containing the
// vector offset.
if (permuteEveryN > 1) {
- int64_t shlBits = N - llvm::Log2_64(permuteEveryN);
+ int64_t shlBits = n - llvm::Log2_64(permuteEveryN);
if (shlBits > 0) {
Value finalShiftVal = b.create<arith::ConstantIndexOp>(loc, shlBits);
srcBits = b.createOrFold<arith::ShLIOp>(loc, srcBits, finalShiftVal);
@@ -90,7 +90,7 @@ static Value permuteVectorOffset(OpBuilder &b, Location loc,
srcBits = b.createOrFold<arith::ShRUIOp>(loc, srcBits, finalShiftVal);
}
} else {
- Value finalShiftVal = b.create<arith::ConstantIndexOp>(loc, N);
+ Value finalShiftVal = b.create<arith::ConstantIndexOp>(loc, n);
srcBits = b.createOrFold<arith::ShLIOp>(loc, srcBits, finalShiftVal);
}
More information about the Mlir-commits
mailing list