clang and Crypto++

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

clang and Crypto++

Marshall Clow
After Doug fixed bug #7851 yesterday (thanks, Doug!), I decided to see if crypto++ <http://www.cryptopp.com/> would build with clang TOT.

Answer: No, it does not.

There are three problems:

1) the crypto++ sources make unqualified calls to member functions in base classes; clang flags this as an error.

> clang++ -DNDEBUG -g -O2 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c panama.cpp
> panama.cpp:425:2: error: use of undeclared identifier 'PadLastBlock'
>        PadLastBlock(this->BLOCKSIZE, 0x01);
>        ^
>        this->
> panama.cpp:500:22: note: in instantiation of member function
>      'CryptoPP::Weak::PanamaHash<CryptoPP::EnumToType<CryptoPP::ByteOrder, 1>
>> ::TruncatedFinal' requested here
> template class Weak::PanamaHash<BigEndian>;
>                     ^
> In file included from panama.cpp:9:
> In file included from ./panama.h:5:
> ./iterhash.h:38:7: note: must qualify identifier to find this declaration in dependent
>      base class
>        void PadLastBlock(unsigned int lastBlockSize, byte padFirst=0x80);
>             ^
> panama.cpp:425:2: error: no member named 'PadLastBlock' in
>      'CryptoPP::Weak::PanamaHash<LittleEndian>'
>        PadLastBlock(this->BLOCKSIZE, 0x01);
>        ^~~~~~~~~~~~
> panama.cpp:501:22: note: in instantiation of member function
>      'CryptoPP::Weak::PanamaHash<CryptoPP::EnumToType<CryptoPP::ByteOrder, 0>
>> ::TruncatedFinal' requested here
> template class Weak::PanamaHash<LittleEndian>;
>                     ^
> In file included from panama.cpp:9:
> In file included from ./panama.h:4:
> In file included from ./strciphr.h:31:
> In file included from ./seckey.h:9:

This is easy to fix in crypto++; just follow the fixit hint (and I have submitted these changes to the crypto++ project)

2) clang asserts when compiling vmac.cpp <http://llvm.org/bugs/show_bug.cgi?id=8913>

3) clang is much, much slower than gcc 4.2.1 when building crypto++.
On my 2007 MacPro:
        gcc takes 8m40s to build.
        clang (TOT this morning) takes much longer; there is one file - sha.cpp which takes over 30 minutes, if it ever does finish, but all the other files combined take more than 45 minutes.

I'm quite happy to provide the modified crypto++ distro in case anyone else is interested in pursuing this.

-- Marshall



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang and Crypto++

Douglas Gregor

On Jan 5, 2011, at 9:06 AM, Marshall Clow wrote:

> After Doug fixed bug #7851 yesterday (thanks, Doug!), I decided to see if crypto++ <http://www.cryptopp.com/> would build with clang TOT.
>
> Answer: No, it does not.
>
> There are three problems:
>
> 1) the crypto++ sources make unqualified calls to member functions in base classes; clang flags this as an error.
>
>> clang++ -DNDEBUG -g -O2 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c panama.cpp
>> panama.cpp:425:2: error: use of undeclared identifier 'PadLastBlock'
>>       PadLastBlock(this->BLOCKSIZE, 0x01);
>>       ^
>>       this->
>> panama.cpp:500:22: note: in instantiation of member function
>>     'CryptoPP::Weak::PanamaHash<CryptoPP::EnumToType<CryptoPP::ByteOrder, 1>
>>> ::TruncatedFinal' requested here
>> template class Weak::PanamaHash<BigEndian>;
>>                    ^
>> In file included from panama.cpp:9:
>> In file included from ./panama.h:5:
>> ./iterhash.h:38:7: note: must qualify identifier to find this declaration in dependent
>>     base class
>>       void PadLastBlock(unsigned int lastBlockSize, byte padFirst=0x80);
>>            ^
>> panama.cpp:425:2: error: no member named 'PadLastBlock' in
>>     'CryptoPP::Weak::PanamaHash<LittleEndian>'
>>       PadLastBlock(this->BLOCKSIZE, 0x01);
>>       ^~~~~~~~~~~~
>> panama.cpp:501:22: note: in instantiation of member function
>>     'CryptoPP::Weak::PanamaHash<CryptoPP::EnumToType<CryptoPP::ByteOrder, 0>
>>> ::TruncatedFinal' requested here
>> template class Weak::PanamaHash<LittleEndian>;
>>                    ^
>> In file included from panama.cpp:9:
>> In file included from ./panama.h:4:
>> In file included from ./strciphr.h:31:
>> In file included from ./seckey.h:9:
>
> This is easy to fix in crypto++; just follow the fixit hint (and I have submitted these changes to the crypto++ project)
>
> 2) clang asserts when compiling vmac.cpp <http://llvm.org/bugs/show_bug.cgi?id=8913>

This looks like an easy fix for someone familiar with LLVM's debug info generator.

> 3) clang is much, much slower than gcc 4.2.1 when building crypto++.
> On my 2007 MacPro:
> gcc takes 8m40s to build.
> clang (TOT this morning) takes much longer; there is one file - sha.cpp which takes over 30 minutes, if it ever does finish, but all the other files combined take more than 45 minutes.


Naturally, we'd like to know where in clang this time is going. Is it the front end (-fsyntax-only)? The optimizer (> -O0), and if so, which one(s)?

  - Doug
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang and Crypto++

Marshall Clow
On Jan 5, 2011, at 9:31 AM, Douglas Gregor wrote:
> On Jan 5, 2011, at 9:06 AM, Marshall Clow wrote:
>
>> After Doug fixed bug #7851 yesterday (thanks, Doug!), I decided to see if crypto++ <http://www.cryptopp.com/> would build with clang TOT.
>>
>> Answer: No, it does not.
>>
>> There are three problems:

[ #1 and #2 snipped out ]

>
>> 3) clang is much, much slower than gcc 4.2.1 when building crypto++.
>> On my 2007 MacPro:
>> gcc takes 8m40s to build.
>> clang (TOT this morning) takes much longer; there is one file - sha.cpp which takes over 30 minutes, if it ever does finish, but all the other files combined take more than 45 minutes.
>
>
> Naturally, we'd like to know where in clang this time is going. Is it the front end (-fsyntax-only)? The optimizer (> -O0), and if so, which one(s)?

Looks like the optimizer.

$ time clang++ -Wno-tautological-compare -DNDEBUG -g         -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -fsyntax-only sha.cpp
real 6.234s
$ time clang++ -Wno-tautological-compare -DNDEBUG -g         -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
real 7.863s
$ time clang++ -Wno-tautological-compare -DNDEBUG -g -O1 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
real 17.882s
$ time clang++ -Wno-tautological-compare -DNDEBUG -g -O2 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
.... long, long time; I killed it after 30 minutes.

How do I tell which one?

-- Marshall


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang and Crypto++

Marshall Clow

On Jan 5, 2011, at 9:45 AM, Marshall Clow wrote:

> On Jan 5, 2011, at 9:31 AM, Douglas Gregor wrote:
>> On Jan 5, 2011, at 9:06 AM, Marshall Clow wrote:
>>
>>> After Doug fixed bug #7851 yesterday (thanks, Doug!), I decided to see if crypto++ <http://www.cryptopp.com/> would build with clang TOT.
>>>
>>> Answer: No, it does not.
>>>
>>> There are three problems:
>
> [ #1 and #2 snipped out ]
>
>>
>>> 3) clang is much, much slower than gcc 4.2.1 when building crypto++.
>>> On my 2007 MacPro:
>>> gcc takes 8m40s to build.
>>> clang (TOT this morning) takes much longer; there is one file - sha.cpp which takes over 30 minutes, if it ever does finish, but all the other files combined take more than 45 minutes.
>>
>>
>> Naturally, we'd like to know where in clang this time is going. Is it the front end (-fsyntax-only)? The optimizer (> -O0), and if so, which one(s)?
>
> Looks like the optimizer.
>
> $ time clang++ -Wno-tautological-compare -DNDEBUG -g         -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -fsyntax-only sha.cpp
> real 6.234s
> $ time clang++ -Wno-tautological-compare -DNDEBUG -g         -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
> real 7.863s
> $ time clang++ -Wno-tautological-compare -DNDEBUG -g -O1 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
> real 17.882s
> $ time clang++ -Wno-tautological-compare -DNDEBUG -g -O2 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
> .... long, long time; I killed it after 30 minutes.
>
> How do I tell which one?

FWIW, it's not all about the optimizer:
$ time g++ -DNDEBUG -g -O2 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
real 1.662s

-- Marshall


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang and Crypto++

Eric Christopher-2
In reply to this post by Marshall Clow

On Jan 5, 2011, at 9:45 AM, Marshall Clow wrote:

> On Jan 5, 2011, at 9:31 AM, Douglas Gregor wrote:
>> On Jan 5, 2011, at 9:06 AM, Marshall Clow wrote:
>>
>>> After Doug fixed bug #7851 yesterday (thanks, Doug!), I decided to see if crypto++ <http://www.cryptopp.com/> would build with clang TOT.
>>>
>>> Answer: No, it does not.
>>>
>>> There are three problems:
>
> [ #1 and #2 snipped out ]
>
>>
>>> 3) clang is much, much slower than gcc 4.2.1 when building crypto++.
>>> On my 2007 MacPro:
>>> gcc takes 8m40s to build.
>>> clang (TOT this morning) takes much longer; there is one file - sha.cpp which takes over 30 minutes, if it ever does finish, but all the other files combined take more than 45 minutes.
>>
>>
>> Naturally, we'd like to know where in clang this time is going. Is it the front end (-fsyntax-only)? The optimizer (> -O0), and if so, which one(s)?
>
> Looks like the optimizer.
>
> $ time clang++ -Wno-tautological-compare -DNDEBUG -g         -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -fsyntax-only sha.cpp
> real 6.234s
> $ time clang++ -Wno-tautological-compare -DNDEBUG -g         -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
> real 7.863s
> $ time clang++ -Wno-tautological-compare -DNDEBUG -g -O1 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
> real 17.882s
> $ time clang++ -Wno-tautological-compare -DNDEBUG -g -O2 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
> .... long, long time; I killed it after 30 minutes.
>
> How do I tell which one?

I'm guessing one of the loop ones, but if you file a bug with a preprocessed file we'll figure it out.

Thanks!

-eric
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang and Crypto++

Eric Christopher-2
In reply to this post by Marshall Clow

On Jan 5, 2011, at 9:51 AM, Marshall Clow wrote:

>
> On Jan 5, 2011, at 9:45 AM, Marshall Clow wrote:
>
>> On Jan 5, 2011, at 9:31 AM, Douglas Gregor wrote:
>>> On Jan 5, 2011, at 9:06 AM, Marshall Clow wrote:
>>>
>>>> After Doug fixed bug #7851 yesterday (thanks, Doug!), I decided to see if crypto++ <http://www.cryptopp.com/> would build with clang TOT.
>>>>
>>>> Answer: No, it does not.
>>>>
>>>> There are three problems:
>>
>> [ #1 and #2 snipped out ]
>>
>>>
>>>> 3) clang is much, much slower than gcc 4.2.1 when building crypto++.
>>>> On my 2007 MacPro:
>>>> gcc takes 8m40s to build.
>>>> clang (TOT this morning) takes much longer; there is one file - sha.cpp which takes over 30 minutes, if it ever does finish, but all the other files combined take more than 45 minutes.
>>>
>>>
>>> Naturally, we'd like to know where in clang this time is going. Is it the front end (-fsyntax-only)? The optimizer (> -O0), and if so, which one(s)?
>>
>> Looks like the optimizer.
>>
>> $ time clang++ -Wno-tautological-compare -DNDEBUG -g         -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -fsyntax-only sha.cpp
>> real 6.234s
>> $ time clang++ -Wno-tautological-compare -DNDEBUG -g         -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
>> real 7.863s
>> $ time clang++ -Wno-tautological-compare -DNDEBUG -g -O1 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
>> real 17.882s
>> $ time clang++ -Wno-tautological-compare -DNDEBUG -g -O2 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
>> .... long, long time; I killed it after 30 minutes.
>>
>> How do I tell which one?
>
> FWIW, it's not all about the optimizer:
> $ time g++ -DNDEBUG -g -O2 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
> real 1.662s

Probably 2 bugs then :)

-eric
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang and Crypto++

Chris Lattner
In reply to this post by Marshall Clow

On Jan 5, 2011, at 9:45 AM, Marshall Clow wrote:

>> Naturally, we'd like to know where in clang this time is going. Is it the front end (-fsyntax-only)? The optimizer (> -O0), and if so, which one(s)?
>
> Looks like the optimizer.
>
> $ time clang++ -Wno-tautological-compare -DNDEBUG -g         -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -fsyntax-only sha.cpp
> real 6.234s
> $ time clang++ -Wno-tautological-compare -DNDEBUG -g         -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
> real 7.863s
> $ time clang++ -Wno-tautological-compare -DNDEBUG -g -O1 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
> real 17.882s
> $ time clang++ -Wno-tautological-compare -DNDEBUG -g -O2 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
> .... long, long time; I killed it after 30 minutes.
>
> How do I tell which one?

Try passing -ftime-report to clang.  Another silly question: did you build clang itself in debug mode?  The first few lines of:

$ clang -cc1 -version

Should show either:

Low Level Virtual Machine (http://llvm.org/):
  llvm version 2.9svn
  DEBUG build with assertions.

or:

Low Level Virtual Machine (http://llvm.org/):
  llvm version 2.9svn
  Optimized build.

-Chris
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang and Crypto++

Marshall Clow
In reply to this post by Eric Christopher-2

On Jan 5, 2011, at 9:53 AM, Eric Christopher wrote:

>
> On Jan 5, 2011, at 9:51 AM, Marshall Clow wrote:
>
>>
>> On Jan 5, 2011, at 9:45 AM, Marshall Clow wrote:
>>
>>> On Jan 5, 2011, at 9:31 AM, Douglas Gregor wrote:
>>>> On Jan 5, 2011, at 9:06 AM, Marshall Clow wrote:
>>>>
>>>>> After Doug fixed bug #7851 yesterday (thanks, Doug!), I decided to see if crypto++ <http://www.cryptopp.com/> would build with clang TOT.
>>>>>
>>>>> Answer: No, it does not.
>>>>>
>>>>> There are three problems:
>>>
>>> [ #1 and #2 snipped out ]
>>>
>>>>
>>>>> 3) clang is much, much slower than gcc 4.2.1 when building crypto++.
>>>>> On my 2007 MacPro:
>>>>> gcc takes 8m40s to build.
>>>>> clang (TOT this morning) takes much longer; there is one file - sha.cpp which takes over 30 minutes, if it ever does finish, but all the other files combined take more than 45 minutes.
>>>>
>>>>
>>>> Naturally, we'd like to know where in clang this time is going. Is it the front end (-fsyntax-only)? The optimizer (> -O0), and if so, which one(s)?
>>>
>>> Looks like the optimizer.
>>>
>>> $ time clang++ -Wno-tautological-compare -DNDEBUG -g         -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -fsyntax-only sha.cpp
>>> real 6.234s
>>> $ time clang++ -Wno-tautological-compare -DNDEBUG -g         -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
>>> real 7.863s
>>> $ time clang++ -Wno-tautological-compare -DNDEBUG -g -O1 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
>>> real 17.882s
>>> $ time clang++ -Wno-tautological-compare -DNDEBUG -g -O2 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
>>> .... long, long time; I killed it after 30 minutes.
>>>
>>> How do I tell which one?
>>
>> FWIW, it's not all about the optimizer:
>> $ time g++ -DNDEBUG -g -O2 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
>> real 1.662s
>
> Probably 2 bugs then :)

Done.
        <http://llvm.org/bugs/show_bug.cgi?id=8916> for the optimizer
        <http://llvm.org/bugs/show_bug.cgi?id=8917> for the front end.

-- Marshall


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang and Crypto++

Marshall Clow
In reply to this post by Chris Lattner

On Jan 5, 2011, at 10:06 AM, Chris Lattner wrote:

>
> On Jan 5, 2011, at 9:45 AM, Marshall Clow wrote:
>
>>> Naturally, we'd like to know where in clang this time is going. Is it the front end (-fsyntax-only)? The optimizer (> -O0), and if so, which one(s)?
>>
>> Looks like the optimizer.
>>
>> $ time clang++ -Wno-tautological-compare -DNDEBUG -g         -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -fsyntax-only sha.cpp
>> real 6.234s
>> $ time clang++ -Wno-tautological-compare -DNDEBUG -g         -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
>> real 7.863s
>> $ time clang++ -Wno-tautological-compare -DNDEBUG -g -O1 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
>> real 17.882s
>> $ time clang++ -Wno-tautological-compare -DNDEBUG -g -O2 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
>> .... long, long time; I killed it after 30 minutes.
>>
>> How do I tell which one?
>
> Try passing -ftime-report to clang.  Another silly question: did you build clang itself in debug mode?  The first few lines of:
>
> $ clang -cc1 -version
>
> Should show either:
>
> Low Level Virtual Machine (http://llvm.org/):
>  llvm version 2.9svn
>  DEBUG build with assertions.
>
> or:
>
> Low Level Virtual Machine (http://llvm.org/):
>  llvm version 2.9svn
>  Optimized build.

D'oh! It's a debug build.
I will build a non-debug one and re-run the timings.

-- Marshall


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Fwd: clang and Crypto++

Gonsolo
---------- Forwarded message ----------
From: Gonsolo <[hidden email]>
Date: Wed, Jan 5, 2011 at 7:23 PM
Subject: Re: [cfe-dev] clang and Crypto++
To: Marshall Clow <[hidden email]>


clang -cc1 -version:
 Low Level Virtual Machine (http://llvm.org/):
 llvm version 2.9
 Optimized build with assertions.

svn 122890

time clang++ -Wno-tautological-compare -DNDEBUG -g -O3
-DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp:

real    0m1.989s
user    0m1.964s
sys     0m0.024s

Everything's ok over here. :)

g

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang and Crypto++

Marshall Clow
In reply to this post by Marshall Clow

On Jan 5, 2011, at 10:13 AM, Marshall Clow wrote:

>
> On Jan 5, 2011, at 10:06 AM, Chris Lattner wrote:
>
>>
>> On Jan 5, 2011, at 9:45 AM, Marshall Clow wrote:
>>
>>>> Naturally, we'd like to know where in clang this time is going. Is it the front end (-fsyntax-only)? The optimizer (> -O0), and if so, which one(s)?
>>>
>>> Looks like the optimizer.
>>>
>>> $ time clang++ -Wno-tautological-compare -DNDEBUG -g         -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -fsyntax-only sha.cpp
>>> real 6.234s
>>> $ time clang++ -Wno-tautological-compare -DNDEBUG -g         -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
>>> real 7.863s
>>> $ time clang++ -Wno-tautological-compare -DNDEBUG -g -O1 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
>>> real 17.882s
>>> $ time clang++ -Wno-tautological-compare -DNDEBUG -g -O2 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp
>>> .... long, long time; I killed it after 30 minutes.
>>>
>>> How do I tell which one?
>>
>> Try passing -ftime-report to clang.  Another silly question: did you build clang itself in debug mode?  The first few lines of:
>>
>> $ clang -cc1 -version
>>
>> Should show either:
>>
>> Low Level Virtual Machine (http://llvm.org/):
>> llvm version 2.9svn
>> DEBUG build with assertions.
>>
>> or:
>>
>> Low Level Virtual Machine (http://llvm.org/):
>> llvm version 2.9svn
>> Optimized build.
>
> D'oh! It's a debug build.
> I will build a non-debug one and re-run the timings.

I've closed bug #8917 (slower than gcc) with a "pilot error" notation.

Gonsolo <[hidden email]> wrote:

> clang -cc1 -version:
>  Low Level Virtual Machine (http://llvm.org/):
>  llvm version 2.9
>  Optimized build with assertions.
>
> svn 122890
>
> time clang++ -Wno-tautological-compare -DNDEBUG -g -O3
> -DCRYPTOPP_DISABLE_ASM -pipe -c sha.cpp:
>
> real    0m1.989s
> user    0m1.964s
> sys     0m0.024s
>
> Everything's ok over here. :)

I'm on r122872 and bug #8916 (hang when compiling sha.cpp) is still happening for me. (on both -O2 and -O3)

-- Marshall


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev