This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Canonicalize static alloc followed by memref_cast and std.view
ClosedPublic

Authored by asaadaldien on Jan 7 2020, 5:49 PM.

Details

Summary

Rewrite alloc, memref_cast, std.view into allo, std.view by droping memref_cast.

Diff Detail

Event Timeline

asaadaldien created this revision.Jan 7 2020, 5:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 7 2020, 5:49 PM

Unit tests: pass. 61305 tests passed, 0 failed and 736 were skipped.

clang-tidy: fail. Please fix clang-tidy findings.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

rriddle retitled this revision from Canonicalize static alloc followed by memref_cast and std.view to [mlir] Canonicalize static alloc followed by memref_cast and std.view.Jan 7 2020, 6:00 PM
rriddle requested changes to this revision.Jan 7 2020, 6:03 PM
rriddle added inline comments.
mlir/lib/Dialect/StandardOps/Ops.cpp
2538

Remove trivial braces.

2546

Can you use named accessors for these instead?

Also, initializer_list is a temporary so this is likely to break. Use an array instead, or inline this into the 'replace' call below.

mlir/test/Transforms/canonicalize.mlir
739

Don't check SSA names directly, they are not preserved.

https://mlir.llvm.org/getting_started/TestingGuide/

This revision now requires changes to proceed.Jan 7 2020, 6:03 PM
nicolasvasilache accepted this revision.Jan 7 2020, 8:14 PM

LGTM conditioned on addressing River's review.

Resolve comments....

asaadaldien marked 4 inline comments as done.Jan 8 2020, 10:46 AM
asaadaldien added inline comments.
mlir/lib/Dialect/StandardOps/Ops.cpp
2546

used ViewOp::operands instead apparently its variadic operands only

asaadaldien marked an inline comment as done.Jan 8 2020, 10:47 AM

Unit tests: pass. 61305 tests passed, 0 failed and 736 were skipped.

clang-tidy: fail. Please fix clang-tidy findings.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

This revision was not accepted when it landed; it landed in state Needs Review.Jan 8 2020, 11:55 AM
This revision was automatically updated to reflect the committed changes.
rriddle added inline comments.Jan 8 2020, 11:57 AM
mlir/test/Transforms/canonicalize.mlir
739

You didn't fix this.

asaadaldien marked an inline comment as done.Jan 8 2020, 12:08 PM
asaadaldien added inline comments.
mlir/test/Transforms/canonicalize.mlir
739

Oh yes changed different line! will send a diff to use ALLOC_MEM instead of %0 everywhere here!