This is an archive of the discontinued LLVM Phabricator instance.

[mlir][llvm] Opaque pointer support for atomic and call ops.
AbandonedPublicDraft

Authored by gysit on Jan 27 2023, 8:47 AM.

Details

Reviewers
ftynse
Summary

This revision adapts the printers and parsers of the LLVM Dialect
AtomicRMWOp, AtomicCmpXchgOp, CallOp, and InvokeOp to support both
opaque and typed pointers by printing the pointer types explicitly.
Previously, the printers and parser of these operations silently assumed
typed pointers. This assumption is problematic if a lowering or the
LLVM IR import produce LLVM Dialect with opaque pointers and the IR is
then printed and parsed, for example, when running mlir-translate. In
LLVM IR itself all tests with typed pointers are already gone. It is
thus important to start switching to opaque pointers.

This revision can be seen as a preparation step for the switch of the
LLVM Dialect to opaque pointers. Once printing an parsing works
seamlessly, all lowerings to LLVM Dialect can be switched to produce
opaque pointers. After a transition period, LLVM Dialect itself can by
simplified to support opaque pointers only.

Diff Detail

Event Timeline

gysit created this revision.Jan 27 2023, 8:47 AM
Herald added a project: Restricted Project. · View Herald Transcript
gysit updated this revision to Diff 493276.Jan 30 2023, 4:55 AM

Use assembly format for atomic ops and print the callee type before the function type.

gysit abandoned this revision.Jan 30 2023, 5:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 30 2023, 5:05 AM