Skip to content

Commit 4376b61

Browse files
[NFC] Drop memref:: before alloc/alloca ops inside
NormalizeMemRefs.cpp Drop `memref::` before references to alloc/alloca ops as we are inside MemRef/Transforms directory.
1 parent d51c46c commit 4376b61

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

mlir/lib/Dialect/MemRef/Transforms/NormalizeMemRefs.cpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ bool NormalizeMemRefs::areMemRefsNormalizable(func::FuncOp funcOp) {
165165
return true;
166166

167167
if (funcOp
168-
.walk([&](memref::AllocOp allocOp) -> WalkResult {
168+
.walk([&](AllocOp allocOp) -> WalkResult {
169169
Value oldMemRef = allocOp.getResult();
170170
if (!allocOp.getType().getLayout().isIdentity() &&
171171
!isMemRefNormalizable(oldMemRef.getUsers()))
@@ -176,7 +176,7 @@ bool NormalizeMemRefs::areMemRefsNormalizable(func::FuncOp funcOp) {
176176
return false;
177177

178178
if (funcOp
179-
.walk([&](memref::AllocaOp allocaOp) -> WalkResult {
179+
.walk([&](AllocaOp allocaOp) -> WalkResult {
180180
Value oldMemRef = allocaOp.getResult();
181181
if (!allocaOp.getType().getLayout().isIdentity() &&
182182
!isMemRefNormalizable(oldMemRef.getUsers()))
@@ -354,16 +354,6 @@ void NormalizeMemRefs::normalizeFuncOpMemRefs(func::FuncOp funcOp,
354354
// Turn memrefs' non-identity layouts maps into ones with identity. Collect
355355
// alloc/alloca ops first and then process since normalizeMemRef
356356
// replaces/erases ops during memref rewriting.
357-
<<<<<<< Updated upstream
358-
SmallVector<memref::AllocOp, 4> allocOps;
359-
funcOp.walk([&](memref::AllocOp op) { allocOps.push_back(op); });
360-
for (memref::AllocOp allocOp : allocOps)
361-
(void)normalizeMemRef(allocOp);
362-
363-
SmallVector<memref::AllocaOp> allocaOps;
364-
funcOp.walk([&](memref::AllocaOp op) { allocaOps.push_back(op); });
365-
for (memref::AllocaOp allocaOp : allocaOps)
366-
=======
367357
SmallVector<AllocOp, 4> allocOps;
368358
funcOp.walk([&](AllocOp op) { allocOps.push_back(op); });
369359
for (AllocOp allocOp : allocOps)
@@ -372,7 +362,6 @@ void NormalizeMemRefs::normalizeFuncOpMemRefs(func::FuncOp funcOp,
372362
SmallVector<AllocaOp> allocaOps;
373363
funcOp.walk([&](AllocaOp op) { allocaOps.push_back(op); });
374364
for (AllocaOp allocaOp : allocaOps)
375-
>>>>>>> Stashed changes
376365
(void)normalizeMemRef(allocaOp);
377366

378367
// Turn memrefs' non-identity layouts maps into ones with identity. Collect

0 commit comments

Comments
 (0)