[cfe-dev] Patch for __builtin_bzero

Daniel Dunbar daniel at zuster.org
Mon Jul 21 17:26:50 PDT 2008


Hi Nico,

I just committed implementations of the bzero, memset, and memcpy builtins
in terms of llvm intrinsics. This should subsume your patch.

Can you confirm that this fixes your vim build?


 - Daniel


----- Original Message ----
From: Nico Weber <nicolasweber at gmx.de>
To: Eli Friedman <eli.friedman at gmail.com>
Cc: cfe-dev at cs.uiuc.edu
Sent: Monday, July 21, 2008 2:20:13 PM
Subject: Re: [cfe-dev] Patch for __builtin_bzero

On 19.07.2008, at 20:24, Eli Friedman wrote:

> On Sat, Jul 19, 2008 at 12:04 AM, Nico Weber <nicolasweber at gmx.de>  
> wrote:
>> Hi,
>>
>> with the attached patch, vim7 can be built with `make CC=ccc`.  
>> Linking takes
>> about 3 minutes (with a debug build of llvm), and vim's build  
>> process runs
>> the linker several times (at least 3 times), so total linking time  
>> is about
>> 9 minutes.
>
> Okay, cool... although the difference between debug and release is
> pretty big.  clang is roughly 2x faster in release mode, and linking
> is roughly 5x faster, if I recall correctly.
>
>> __builtin_bzero() simply calls the library's bzero() in this patch.
>> Would it be better to use the llvm.memset intrinsic instead? I  
>> believe
>> Windows does not have bzero in its c library.
>
> I'd say don't bother for the moment; if it becomes an issue, we can
> deal with it later.


Great. Can someone commit the patch? I changed the test so that it  
does no longer compile and execute the code, it now uses grep.

Nico



More information about the cfe-dev mailing list