This is an archive of the discontinued LLVM Phabricator instance.

[mlir][emitc] Disallow !emitc.opaque pointers
ClosedPublic

Authored by marbre on Apr 19 2022, 6:43 AM.

Details

Summary

Fordbids to express pointer via the !emitc.opaque type. Point the user
to use the !emitc.ptr type instead.

Diff Detail

Event Timeline

marbre created this revision.Apr 19 2022, 6:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2022, 6:43 AM
marbre requested review of this revision.Apr 19 2022, 6:43 AM
jpienaar added inline comments.Apr 25 2022, 7:05 AM
mlir/lib/Dialect/EmitC/IR/EmitC.cpp
225

Should this only be on the outer most? E.g., this would flag a Small vector<int*, 4> too

marbre updated this revision to Diff 424919.Apr 25 2022, 8:11 AM

Updating D124002: [mlir][emitc] Disallow !emitc.opaque pointers

Only disallow pointers in outer type

marbre marked an inline comment as done.Apr 25 2022, 8:13 AM
marbre added inline comments.
mlir/lib/Dialect/EmitC/IR/EmitC.cpp
225

Excellent fetch! Thanks for the hint, I've adopted accordingly and also added a test for a the valid "SmalVector<int*, 4>" case.

jpienaar accepted this revision.Apr 27 2022, 5:22 PM

Thanks!

This revision is now accepted and ready to land.Apr 27 2022, 5:22 PM
This revision was landed with ongoing or failed builds.Apr 28 2022, 8:09 AM
This revision was automatically updated to reflect the committed changes.