[Mlir-commits] [mlir] [MLIR] NFC. Remove anti-patterns given the default null init for Value (PR #99457)
Uday Bondhugula
llvmlistbot at llvm.org
Thu Jul 18 02:09:33 PDT 2024
https://github.com/bondhugula created https://github.com/llvm/llvm-project/pull/99457
Remove anti-patterns given the default null init for Value. Drop some
extra includes while on this file. NFC.
>From c9ad0fd1d7c33d1900c980107bd7c5138e0f4ded Mon Sep 17 00:00:00 2001
From: GitHub runner <github-runner at polymagelabs.com>
Date: Mon, 22 Apr 2024 10:41:10 +0530
Subject: [PATCH] [MLIR] NFC. Remove anti-patterns given the default null init
for Value
Remove anti-patterns given the default null init for Value. Drop some
extra includes while on this file. NFC.
---
mlir/lib/Dialect/Affine/Utils/LoopUtils.cpp | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/mlir/lib/Dialect/Affine/Utils/LoopUtils.cpp b/mlir/lib/Dialect/Affine/Utils/LoopUtils.cpp
index 605737542e9fc..f09d93f3ba444 100644
--- a/mlir/lib/Dialect/Affine/Utils/LoopUtils.cpp
+++ b/mlir/lib/Dialect/Affine/Utils/LoopUtils.cpp
@@ -12,10 +12,8 @@
#include "mlir/Dialect/Affine/LoopUtils.h"
#include "mlir/Analysis/SliceAnalysis.h"
-#include "mlir/Dialect/Affine/Analysis/AffineAnalysis.h"
#include "mlir/Dialect/Affine/Analysis/LoopAnalysis.h"
#include "mlir/Dialect/Affine/Analysis/Utils.h"
-#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Affine/IR/AffineValueMap.h"
#include "mlir/Dialect/Affine/Utils.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
@@ -2082,8 +2080,8 @@ static LogicalResult generateCopy(
auto numElementsSSA = top.create<arith::ConstantIndexOp>(loc, *numElements);
- Value dmaStride = nullptr;
- Value numEltPerDmaStride = nullptr;
+ Value dmaStride;
+ Value numEltPerDmaStride;
if (copyOptions.generateDma) {
SmallVector<StrideInfo, 4> dmaStrideInfos;
getMultiLevelStrides(region, fastBufferShape, &dmaStrideInfos);
More information about the Mlir-commits
mailing list