Skip to content

Commit 24e4b70

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 11eba53 commit 24e4b70

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

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

Lines changed: 2 additions & 18 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()))
@@ -353,23 +353,8 @@ void NormalizeMemRefs::updateFunctionSignature(func::FuncOp funcOp,
353353
void NormalizeMemRefs::normalizeFuncOpMemRefs(func::FuncOp funcOp,
354354
ModuleOp moduleOp) {
355355
// Turn memrefs' non-identity layouts maps into ones with identity. Collect
356-
<<<<<<< Updated upstream
357-
// alloc/alloca ops first and then process since normalizeMemRef
358-
// replaces/erases ops during memref rewriting.
359-
<<<<<<< Updated upstream
360-
SmallVector<memref::AllocOp, 4> allocOps;
361-
funcOp.walk([&](memref::AllocOp op) { allocOps.push_back(op); });
362-
for (memref::AllocOp allocOp : allocOps)
363-
(void)normalizeMemRef(allocOp);
364-
365-
SmallVector<memref::AllocaOp> allocaOps;
366-
funcOp.walk([&](memref::AllocaOp op) { allocaOps.push_back(op); });
367-
for (memref::AllocaOp allocaOp : allocaOps)
368-
=======
369-
=======
370356
// alloc, alloca ops and reinterpret_cast ops first and then process since
371357
// normalizeMemRef replaces/erases ops during memref rewriting.
372-
>>>>>>> Stashed changes
373358
SmallVector<AllocOp, 4> allocOps;
374359
SmallVector<AllocaOp> allocaOps;
375360
SmallVector<ReinterpretCastOp> reinterpretCastOps;
@@ -384,7 +369,6 @@ void NormalizeMemRefs::normalizeFuncOpMemRefs(func::FuncOp funcOp,
384369
for (AllocOp allocOp : allocOps)
385370
(void)normalizeMemRef(allocOp);
386371
for (AllocaOp allocaOp : allocaOps)
387-
>>>>>>> Stashed changes
388372
(void)normalizeMemRef(allocaOp);
389373
for (ReinterpretCastOp reinterpretCastOp : reinterpretCastOps)
390374
(void)normalizeMemRef(reinterpretCastOp);

0 commit comments

Comments
 (0)