[Mlir-commits] [mlir] b53b964 - [mlir] Fix a deprecation warning

Kazu Hirata llvmlistbot at llvm.org
Tue Jan 17 13:12:46 PST 2023


Author: Kazu Hirata
Date: 2023-01-17T13:12:40-08:00
New Revision: b53b964093ba779c09a629b2cb9f497314ba0437

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

LOG: [mlir] Fix a deprecation warning

This patch fixes:

  mlir/include/mlir/Dialect/Affine/LoopUtils.h:332:25: error:
  'makeMutableArrayRef<mlir::scf::ForOp>' is deprecated: Use deduction
  guide instead [-Werror,-Wdeprecated-declarations]

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Affine/LoopUtils.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Affine/LoopUtils.h b/mlir/include/mlir/Dialect/Affine/LoopUtils.h
index f598625e565b1..828f06129167c 100644
--- a/mlir/include/mlir/Dialect/Affine/LoopUtils.h
+++ b/mlir/include/mlir/Dialect/Affine/LoopUtils.h
@@ -329,7 +329,7 @@ LogicalResult coalescePerfectlyNestedLoops(LoopOpTy op) {
         continue;
       assert(maxPos == start &&
              "expected loop bounds to be known at the start of the band");
-      auto band = llvm::makeMutableArrayRef(loops.data() + start, end - start);
+      auto band = llvm::MutableArrayRef(loops.data() + start, end - start);
       if (succeeded(coalesceLoops(band)))
         result = success();
       break;


        


More information about the Mlir-commits mailing list