This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Update LLVM dialect type documentation
ClosedPublic

Authored by ftynse on Jan 12 2021, 3:08 AM.

Details

Summary

Recent commits reconfigured LLVM dialect types to use built-in types whenever
possible. Update the documentation accordingly.

Diff Detail

Event Timeline

ftynse created this revision.Jan 12 2021, 3:08 AM
ftynse requested review of this revision.Jan 12 2021, 3:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2021, 3:08 AM
mehdi_amini accepted this revision.Jan 12 2021, 1:24 PM
This revision is now accepted and ready to land.Jan 12 2021, 1:24 PM
This revision was automatically updated to reflect the committed changes.
silvas added inline comments.Jan 12 2021, 4:29 PM
mlir/docs/Dialects/LLVM.md
214

You might want to explicitly say something like "Each LLVM IR type corresponds to exactly one MLIR type. For example, because i32 is LLVM-compatible, there is no !llvm.i32 type. However, !llvm.ptr<T> is defined in the LLVM dialect as there is no corresponding builtin type."

This is an important invariant of the mental model that makes this mixed situation understandable to users.

Perhaps there is a better name for the "builtin types that are used as part of the LLVM dialect" than "compatible". To me, "compatible" suggests that they can optionally be used, when in fact their use is mandatory.

ftynse marked an inline comment as done.Jan 19 2021, 4:43 AM