Page MenuHomePhabricator

[mlir][emitc] Add a pointer type
ClosedPublic

Authored by marbre on Feb 9 2022, 7:00 AM.

Details

Summary

Adds a pointer type to EmitC. The emission of pointers is so far only
possible by using the emitc.opaque type

Co-authored-by: Simon Camphausen <simon.camphausen@iml.fraunhofer.de>

Diff Detail

Event Timeline

marbre created this revision.Feb 9 2022, 7:00 AM
marbre requested review of this revision.Feb 9 2022, 7:01 AM
jpienaar added inline comments.Feb 9 2022, 7:28 AM
mlir/include/mlir/Dialect/EmitC/IR/EmitCTypes.td
57

Could you add comments for these with what will be emitted?

mlir/lib/Dialect/EmitC/IR/EmitC.cpp
224

Is the declarative syntax unable to handle it?

marbre added inline comments.Feb 9 2022, 8:47 AM
mlir/include/mlir/Dialect/EmitC/IR/EmitCTypes.td
57

Good point! Will add comment with the next revision.

mlir/lib/Dialect/EmitC/IR/EmitC.cpp
224

Do you suggest to set useDefaultTypePrinterParser to 0? As far as I see, this is not possible as the opaque type requires a custom parser/printer.

marbre updated this revision to Diff 407430.Feb 10 2022, 2:09 AM

Updating D119337: [mlir][emitc] Add a pointer type

Add comments to show what will be emitted.
Use the declarative syntax.

marbre marked 2 inline comments as done.Feb 10 2022, 2:18 AM

@jpienaar I adressed your comments with the latest revision.

mlir/lib/Dialect/EmitC/IR/EmitC.cpp
224

The assembly format is now declared in tblgen.

marbre updated this revision to Diff 407461.Feb 10 2022, 3:42 AM

Updating D119337: [mlir][emitc] Add a pointer type

[nfc] Harmonize naming of variables used in type builders.

jpienaar accepted this revision.Feb 14 2022, 8:12 AM

Thanks!

This revision is now accepted and ready to land.Feb 14 2022, 8:12 AM
This revision was automatically updated to reflect the committed changes.