[cfe-dev] distributed clang patch
Csaba Hruska
csaba.hruska at gmail.com
Thu Jul 10 16:56:49 PDT 2008
2008/7/11 Ted Kremenek <kremenek at apple.com>:
>
> On Jul 10, 2008, at 10:56 AM, Csaba Hruska wrote:
>
> About supporting other compilers by distributed clang: Ted, please
>> describe you ideas, because i have no idea what's the point of this thing.
>>
>
> Suppose (for whatever reason) that a user wants to use icc/gcc to compile
> their sources instead of Clang. They can still benefit from the
> clang-distcc because of the performance advantage of Clang's preprocessor
> over using the preprocessor typically used by those compilers. Right now,
> distcc has to fork off a process just to preprocess a file, which also
> involves writing preprocessed files out to disk. A clang-distcc can have an
> integrated preprocessor that can be much faster, as it can be linked
> directly into the same executable (no fork and exec). Much of the
> scalability of distcc comes with how quickly you can send source code to the
> slave machines, so even if the end compiler is not Clang there is still a
> benefit to using clang-distcc over vanilla distcc.
>
This looks for me a completly different project called: integrating clang
preprocessor to (original) distcc because except the used preprocessor
remains the original (command line options, network protocol and the whole
functionality). This is not bad but i dont think that this is the primary
task of this project. In my opinion the main goal to make as fast and
scalable and portable(support crosscompialtion) compiler as we can using
clang.
>
> Another advantage of allowing other compilers to work with clang-distcc is
> that you get a *staged* implementation. Instead of requiring Clang to
> preprocess, parse, and compile in order to get clang-distcc working, you
> only need the preprocessing to work to get the core distcc functionality in
> place. This also allows clang-distcc to be used to compile code that Clang
> cannot: e.g., the full richness of C++. It also allows one to play with the
> distributed computed core of of clang-distcc without waiting for end-to-end
> compilation functionality in Clang to be completed.
>
> Incorporating more than just preprocessing into clang-distcc simply allows
> more optimizations, but the end-to-end functionality is already all there.
> For example, if you also parse the ASTs in clang-distcc , we can parse ASTs
> and serialize those over the wire (much more compact than preprocessed
> text). Those serialized ASTs could be compiled using Clang on the remote
> machine, or pretty-printed out and sent through the other compilers.
>
This feature is supported by peter neumark's inital version: see
-dist-serializelocally command line option. We can improve it with some
realtime compression later.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080711/8d3168b6/attachment.html>
More information about the cfe-dev
mailing list