This is an archive of the discontinued LLVM Phabricator instance.

Switch the CallbackOstream wrapper in the MLIR C API to an Unbuffered stream
ClosedPublic

Authored by mehdi_amini on Nov 3 2020, 3:48 PM.

Details

Summary

This delegate the control of the buffering to the user of the API. This
seems like a safer option as messages are immediately propagated to the
user, which may lead to less surprising behavior during debugging for
instance.
In terms of performance, a user can add a buffered stream on the other
side of the callback.

Diff Detail

Event Timeline

mehdi_amini created this revision.Nov 3 2020, 3:48 PM
mehdi_amini requested review of this revision.Nov 3 2020, 3:48 PM
rriddle accepted this revision.Nov 3 2020, 3:55 PM
rriddle added inline comments.
mlir/include/mlir/CAPI/Utils.h
31

nit: Seems like there is an extra space in the comment here.

This revision is now accepted and ready to land.Nov 3 2020, 3:55 PM
stellaraccident accepted this revision.Nov 3 2020, 10:18 PM

Good catch.