CoreRT CoreLib does this already. Related https://github.com/dotnet/coreclr/issues/9474. It can be used for performance optimizations like https://github.com/dotnet/coreclr/pull/18101#discussion_r190346937