This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add print functions for i64, index.
ClosedPublic

Authored by pifon2a on Nov 9 2020, 5:44 AM.

Diff Detail

Event Timeline

pifon2a created this revision.Nov 9 2020, 5:44 AM
pifon2a requested review of this revision.Nov 9 2020, 5:44 AM
tpopp accepted this revision.Nov 10 2020, 10:58 AM
tpopp added inline comments.
mlir/lib/ExecutionEngine/RunnerUtils.cpp
48

Just confirming that this shouldn't be something like size_t.

This revision is now accepted and ready to land.Nov 10 2020, 10:58 AM
herhut added inline comments.Nov 13 2020, 1:42 AM
mlir/include/mlir/ExecutionEngine/RunnerUtils.h
226

I would not add index, as we do not know at this level (C, which is called from LLVM) what type index will have. Could we instead do something where we call the print_memref_i32 and have a index_cast operation in front? Not sure index_cast works on memrefs but that would be a nice approach.

Until then, maybe at least call this print_memref_index_as_i64?

mlir/lib/ExecutionEngine/RunnerUtils.cpp
48

Directly forward to`print_memref_i64`?

pifon2a updated this revision to Diff 307071.Nov 23 2020, 6:57 AM

Address the comments.

frgossen accepted this revision.Nov 23 2020, 7:18 AM
herhut accepted this revision.Nov 23 2020, 7:18 AM
This revision was landed with ongoing or failed builds.Nov 23 2020, 7:18 AM
This revision was automatically updated to reflect the committed changes.