That's an interesing question. I guess with the new Frontend IR this should be a deal of frontend compiler and shouldn't actually concern platform-related backends. As for how it's done right now, I'm not sure as I didn't check that. But knwoing that even main IR is a recent feature, previously the only artifacts compiler had were platform output (JS, JVM bytecode, etc) and Kotlin-specific metadata, compiler has to transform the former to inline actual function.
Once again, these are solely my speculations.