This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Include GENERIC_TF_SOURCES
ClosedPublic

Authored by sbc100 on Nov 7 2017, 10:48 AM.

Event Timeline

sbc100 created this revision.Nov 7 2017, 10:48 AM
sbc100 added a subscriber: cfe-commits.
dschuff accepted this revision.Nov 7 2017, 10:53 AM

BTW I'm still trying to get caught up, so if there's some review or something you have in flight that you want me to get to first, just let me know.

This revision is now accepted and ready to land.Nov 7 2017, 10:53 AM

Also btw I still think I want to back out the "long-double-is-f128" ABI from wasm. But either way it probably doesn't hurt to have these in compiler-rt.

I guess if we make that change we can revert this one?

Yeah. Or not; I think you can still use __float128 types in clang, so if you did that then it would use these methods too. And as long as long double is f64 then none of these functions would get pulled into every program that uses printf (which is the case now), so it wouldn't impose any cost on anyone that doesn't actually use f128. So in that case there's not really a reason not to have it.

My guess was that it was "long-double-is-f128" that was causing clang to generate references to these symbols, but I wasn't totally sure.. its only aarch64 and mips64 that seem to require these thus far.

This revision was automatically updated to reflect the committed changes.

Yes; in particular, musl's implementation of printf has some code where it promotes everything to long double, so if long double is f128, that causes several of these functions to get linked in to every binary, for no real benefit to the user.