[Mlir-commits] [mlir] 258091e - [mlir] Fix -Wunused-variable in XeGPUOps.cpp (NFC)

Jie Fu llvmlistbot at llvm.org
Wed Mar 20 16:52:37 PDT 2024


Author: Jie Fu
Date: 2024-03-21T07:51:56+08:00
New Revision: 258091e76df69072e7088a5e251a2db7f8e3d0a9

URL: https://github.com/llvm/llvm-project/commit/258091e76df69072e7088a5e251a2db7f8e3d0a9
DIFF: https://github.com/llvm/llvm-project/commit/258091e76df69072e7088a5e251a2db7f8e3d0a9.diff

LOG: [mlir] Fix -Wunused-variable in XeGPUOps.cpp (NFC)

llvm-project/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp:47:8:
error: unused variable 'ty' [-Werror,-Wunused-variable]
  auto ty = source.getType();
       ^
1 error generated.

Added: 
    

Modified: 
    mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp b/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
index a0bed513567d29..02106f221f3233 100644
--- a/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+++ b/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
@@ -44,7 +44,7 @@ static std::string makeString(T array, bool breakline = false) {
 void CreateNdDescOp::build(OpBuilder &builder, OperationState &state,
                            Type tdesc, TypedValue<MemRefType> source,
                            llvm::ArrayRef<OpFoldResult> offsets) {
-  auto ty = source.getType();
+  [[maybe_unused]] auto ty = source.getType();
   assert(ty.hasStaticShape() && offsets.size() == (size_t)ty.getRank());
 
   llvm::SmallVector<int64_t> staticOffsets;


        


More information about the Mlir-commits mailing list