Printing to string should not be in any hot code path, it is mostly used for debug output and exporting to a JSON file, we don't really need to optimize it. I think the higher priority would be to move-semantics for isl objects where we currently impose more cow-copies than necessary and used everywhere.
There are alternatives to to_str(). E.g.:
1. dump() / polly::dumpPw()
2. Use the C API to_str directly for glue code (such as to_string).
4. isl_printer_print_* (not exposed by the C++ interface I think)
5. ISLIOStream.h (well, it calls the to_str() method, but could be made to use the C interface instead)
6. stringFromIslObj (GICHelper.h, which AFAICS is exactly what you proposed)
Using the C interface for glue coe is fine, just for the main Polly logic it's nicer to not having to think (too much) about memory management.