Issue 146159
Summary Modular Printf Implemenation
Labels new issue
Assignees
Reporter mysterymath
    This is a tracking issue for implemenation work for [RFC: printf Code Size Optimization](https://discourse.llvm.org/t/rfc-printf-code-size-optimization/83146).

This would take the form of a new clang function attribute, `modular_format(<modular_impl_fn>, <impl_name>, <aspects...>)`. This could only be applied to functions that also bear the `format` attribute. It would inform the compiler that it could redirect the call to the modular version of the function, so long as it emitted a reference to a symbol corresponding to each requested aspect that it could not prove is unused by the call.

The symbols referenced take the form `<impl_name>_<aspect>`, which allows many different front-end functions to share the same implementation. For example, `fprintf`, and `printf` would both share the implementation name `__printf`.

The initial implementation would support only the `float` aspect, which is required by any call with a floating point argument.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to