[Mlir-commits] [llvm] [mlir] [mlir] API to serialize bytecode to mmap'd buffer (PR #126953)
Nikhil Kalra
llvmlistbot at llvm.org
Wed Feb 12 11:01:36 PST 2025
nikalra wrote:
> It's not yet clear to me the utility of this API. I'd prefer to keep the interface constrained to just going through raw_ostream, instead of adding additional API (especially for this one which has somewhat complex constraints/contract with the user).
>
> It seems like the only thing really missing from the actual bytecode logic is to call `reserveExtraSpace` on the provided raw_ostream before the writeTo call? That would allow for custom ostreams to do whatever logic they need to enable avoiding multiple allocations when writing to a buffer.
Ah, thank you! I was hoping there was an easier way to do this. I'll update the PR to do that.
https://github.com/llvm/llvm-project/pull/126953
More information about the Mlir-commits
mailing list