[cfe-commits] [PATCH][MS][Review request] - Late Microsoft template parsing

Francois Pichet pichet2000 at gmail.com
Thu Apr 21 04:53:44 PDT 2011


On Thu, Apr 14, 2011 at 11:23 AM, Douglas Gregor <dgregor at apple.com> wrote:
>
> On Apr 14, 2011, at 8:22 AM, Francois Pichet wrote:
>
>> On Sat, Apr 9, 2011 at 1:59 PM, Francois Pichet <pichet2000 at gmail.com> wrote:
>>> Hi here is an updated patch
>>>
>>>
>>> On Sat, Mar 26, 2011 at 7:29 PM, Douglas Gregor <dgregor at apple.com> wrote:
>>>>
>>>> Nifty. A bunch of comments below.


Hi here is an update patch.

The main difference with this patch is that template parsing is done
only if an instantiation is actually needed.

The only problem is that my patch doesn't correctly diagnostic
multiple definition of template code. I put a FIXME and I'll look at
this problem later (soon).

With this patch all Microsoft C++ headers parse if there is no
instantiation requested.
With instantiation requested there are only 3-4 remaining problems.

There is a 4-5% speed improvement when doing a clang self hosting with
delayed template parsing.
./configure --enable-optimized CC=/usr/local/bin/clang
CXX=/usr/local/bin/clang++
make CXXFLAGS=-fdelayed-template-parsing.

On my Mac Mini this is shaving about 90 seconds out of 33 minutes for
a complete build. The resulting binary passes all the clang test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LateTemplateParsing3.patch
Type: application/octet-stream
Size: 29720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110421/26c0e236/attachment.obj>


More information about the cfe-commits mailing list