[cfe-dev] Multi core processor and clang

John McCall rjmccall at apple.com
Sun Oct 2 20:43:13 PDT 2011


On Oct 2, 2011, at 7:52 PM, Don Quixote de la Mancha wrote:
> IN PRINCIPAL - but I realize NOT YET in reality - clang could first
> locate the beginning of each function definition in a source file,
> then compile each function in a separate thread.
> 
> I don't doubt that would require major rearchitecture to accomplish.

Right, and it wouldn't necessarily actually be a significant performance win,
since we'd also need to carefully introduce concurrency controls on all the
shared data.  And that's even discounting things like elaborated-type-specifiers
and extern function declarations that require coordination between functions.

Given the overhead costs, the language design, and the enormous burden
of switching established code to be concurrent (plus maintaining the
necessarily-more-complex concurrent code), it'd be really hard to justify
sub-translation-unit concurrency in the frontend.

John.



More information about the cfe-dev mailing list