[Mlir-commits] [mlir] [mlir][VectorOps] Support string literals in `vector.print` (PR #68695)
Aart Bik
llvmlistbot at llvm.org
Wed Oct 18 16:13:06 PDT 2023
https://github.com/aartbik commented:
Thanks for adding this very useful feature!
Note that calling "puts" puts a direct dependence on the std lib for this to work, while originally the idea of the vector print support in the CRunnerlibrary was that users could provide implementation of "just" a few basic print operations (printI64, printU64, etc.) and then provide their own implementation, usually indeed using a std lib, as in
extern "C" void printNewline() { fputc('\n', stdout); }
So from that sense, would it make sense to provide
extern "C" void printString(char *) { fputs(s, stdout); }
and use that extra indirection to stay along the original philosophy I had for this library?
https://github.com/llvm/llvm-project/pull/68695
More information about the Mlir-commits
mailing list