[cfe-dev] Why clang needs to fork into itself?
kremenek at apple.com
Wed Jan 29 00:35:09 PST 2014
On Jan 28, 2014, at 11:58 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> That said, most users of the compiler don't actually *want* a driver. They want just a .c* -> .o compiler, not a multi-source-file cross-language compiler + assembler + linker + kitchen sink, and it makes sense to me to optimize for the single-source, -c case.
I don’t really know if it matters what most users “want.” We still need to support the kitchen sink model; it’s never going to go away.
By “optimize”, what specifically do you propose/suggest? Even the .c -> .o compiler benefits from process isolation for the purpose of crash reporting. Perhaps there are alternate solutions for reporting crashes, but they are a bit speculative at this point.
I also haven’t seen any numbers mentioned on this thread that justify “optimizing” anything, at least from a performance perspective. I’m not saying there isn’t a possible performance win here by eliminating the posix_spawn call, but that hasn’t been justified yet (or if it has, I apologize that I haven’t seen it). Or perhaps this discussion isn’t about optimizing performance, but refining the driver design. In that case, it’s not clear to me what specific problems are being tackled here other than possibly making the compiler a little easier to debug or profile.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev