<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Sat, Jun 3, 2017 at 6:54 AM Boris Kolpackov <<a href="mailto:boris@codesynthesis.com">boris@codesynthesis.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> writes:<br>
<br>
> Does this actually speed up clang in an observable way?<br>
<br>
I haven't measured, but I very much doubt there will be any significant<br>
speedup if you are going all the way to the object code, so to speak.<br>
The benefit will come if you want to send the file for compilation on<br>
a remote host. In this case you won't need to start the compiler locally<br>
at all.<br></blockquote><div><br>Not sure I follow this - that's a benefit to the build system in knowing whether it needs to preprocess the file before sending it to the remote system. But not a benefit to the compiler/clang.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
> What makes it more likely for modularized code? In the sense that many more<br>
> source files won't /need/ to use the preprocessor, so they're sort of<br>
> quasi-preprocessed (trivially, in the sense that there's no work to do)<br>
> already?<br>
<br>
Yes, exactly. They won't need #include's and quite a bit of code could<br>
probably be written without relying on macros (especially so for module<br>
interface units).<br>
<br>
One hold out is assert(). Maybe it can be done as a compiler intrinsic?<br></blockquote><div><br>I don't think it can, but maybe - the issue being that the contents of the assert expression mustn't be evaluated or even parsed, etc, if assertions are not enabled.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Boris<br>
</blockquote></div></div>