Why Clang

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

Why Clang

Thomas D. Dean
Has the discussion on why change to clang been made available?

I would like to know the reasoning.

Or, is it simply a gratuitous  change?

Tom Dean
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Waitman Gobble
On Jun 6, 2012 10:32 AM, "Thomas D. Dean" <[hidden email]> wrote:

>
> Has the discussion on why change to clang been made available?
>
> I would like to know the reasoning.
>
> Or, is it simply a gratuitous  change?
>
> Tom Dean
> _______________________________________________
> [hidden email] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
[hidden email]"

i believe it at least partially has to do with license. FreeBSD does not
"ship" (maybe correct word?) with any GPLv3 licensed software.

Waitman Gobble
San Jose California USA
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Brian W.
On Wed, Jun 6, 2012 at 10:39 AM, Waitman Gobble <[hidden email]> wrote:

> On Jun 6, 2012 10:32 AM, "Thomas D. Dean" <[hidden email]> wrote:
> >
> > Has the discussion on why change to clang been made available?
> >
> > I would like to know the reasoning.
> >
> > Or, is it simply a gratuitous  change?
> >
> > Tom Dean
> > _______________________________________________
> > [hidden email] mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to "
> [hidden email]"
>
> i believe it at least partially has to do with license. FreeBSD does not
> "ship" (maybe correct word?) with any GPLv3 licensed software.
>
> Waitman Gobble
> San Jose California USA
> _______________________________________________
>
> It seems that GPLv3 and the desire to make clang the default in FreeBSD 10
are 2 of the reasons.

Brian
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Matthew Seaman-5
In reply to this post by Thomas D. Dean
On 06/06/2012 18:28, Thomas D. Dean wrote:
> Has the discussion on why change to clang been made available?

Yes, endlessly.  Mostly on lists like freebsd-hackers@... and at various
conferences and developer summits.  Check the list archives.

> I would like to know the reasoning.

It's simple.  gcc-4.2, which is what the base system compiler is derived
from is:

    * fairly old

    * doesn't perform as well as more recent compilers

    * doesn't adhere to recently established standards

Clearly an update was necessary.  Unfortunately, later versions of gcc
have switched to GPLv3, which is a viral license and unacceptable to the
FreeBSD project.

Therefore clang was chosen from amongst a number of alternatives as the
best replacement.  That makes it sound as if clang is a second class
option compared to recent gcc, but this is certainly not the case:
results from clang are comparable to the latest gcc versions and the
design of clang is such that further optimizations and improvements can
be readily incorporated.

> Or, is it simply a gratuitous  change?

I can assure you that the changes were not made specifically to annoy
you.  Of course there were very solid technical reasons behind what was
selected.

        Cheers,

        Matthew


--
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey




signature.asc (275 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Mehmet Erol Sanliturk
In reply to this post by Waitman Gobble
On Wed, Jun 6, 2012 at 10:39 AM, Waitman Gobble <[hidden email]> wrote:

> On Jun 6, 2012 10:32 AM, "Thomas D. Dean" <[hidden email]> wrote:
> >
> > Has the discussion on why change to clang been made available?
> >
> > I would like to know the reasoning.
> >
> > Or, is it simply a gratuitous  change?
> >
> > Tom Dean
> > _______________________________________________
> > [hidden email] mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to "
> [hidden email]"
>
> i believe it at least partially has to do with license. FreeBSD does not
> "ship" (maybe correct word?) with any GPLv3 licensed software.
>
> Waitman Gobble
> San Jose California USA
>


Because  commercial companies using FreeBSD in their proprietary products
are NOT willing to use
GPL v3 licensed software due to severe restrictions which commercial
companies can NOT fulfill in their proprietary products .

If FreeBSD uses GPL v3 software in its production , it will lost commercial
company  supporters and users base .

This my understanding from previously read messages .

Thank you very much .

Mehmet Erol Sanliturk
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

文鳥
In reply to this post by Matthew Seaman-5
On Wed, 06 Jun 2012 19:05:59 +0100
Matthew Seaman <[hidden email]> wrote:

> On 06/06/2012 18:28, Thomas D. Dean wrote:
> > Has the discussion on why change to clang been made available?
>
> Yes, endlessly.  Mostly on lists like freebsd-hackers@... and at
> various conferences and developer summits.  Check the list archives.
>
> > I would like to know the reasoning.
>
> It's simple.  gcc-4.2, which is what the base system compiler is
> derived from is:
>
>     * fairly old
>
>     * doesn't perform as well as more recent compilers
>
>     * doesn't adhere to recently established standards

There's another good reason for clang which nobody mentioned so far:
clear diagnostics. If you ever had to wade through gcc's debug output
and compare several thousand character long template instantiations,
just to find where they differ and then see the clear problem
descriptions that clang produces instead, you'll understand what I
mean.
And in combination with libc++, which just arrived on stable, I am
finally able to use all the features of C++11 that I want. Try to use
e.g. std::regex even on g++47, and just see what happens.
Of course, getting rid of GPL is an added benefit ;)
After reading all those complaints, I just had to respond and thank
everyone involved very much for importing clang and libc++. Great job
well done!

Best regards,
  文鳥
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Joe Gain
On Wed, Jun 6, 2012 at 9:11 PM, 文鳥 <[hidden email]> wrote:
> On Wed, 06 Jun 2012 19:05:59 +0100
> Matthew Seaman <[hidden email]> wrote:
>
>> On 06/06/2012 18:28, Thomas D. Dean wrote:
>> > Has the discussion on why change to clang been made available?
>>

You might be interested in this video:
http://www.llvm.org/devmtg/2011-11/videos/Davis_LLVMinFreeBSD-mobile.mp4

>> Yes, endlessly.  Mostly on lists like freebsd-hackers@... and at
>> various conferences and developer summits.  Check the list archives.
>>
>> > I would like to know the reasoning.
>>
>> It's simple.  gcc-4.2, which is what the base system compiler is
>> derived from is:
>>
>>     * fairly old
>>
>>     * doesn't perform as well as more recent compilers
>>
>>     * doesn't adhere to recently established standards
>
> There's another good reason for clang which nobody mentioned so far:
> clear diagnostics. If you ever had to wade through gcc's debug output
> and compare several thousand character long template instantiations,
> just to find where they differ and then see the clear problem
> descriptions that clang produces instead, you'll understand what I
> mean.
> And in combination with libc++, which just arrived on stable, I am
> finally able to use all the features of C++11 that I want. Try to use
> e.g. std::regex even on g++47, and just see what happens.
> Of course, getting rid of GPL is an added benefit ;)
> After reading all those complaints, I just had to respond and thank
> everyone involved very much for importing clang and libc++. Great job
> well done!
>
> Best regards,
>  文鳥
> _______________________________________________
> [hidden email] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[hidden email]"



--
joe gain

jacob-burckhardt-str. 16
78464 konstanz
germany

+49 (0)7531 60389

(...otherwise in ???)
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Robert Bonomi
In reply to this post by Thomas D. Dean
> From [hidden email]  Wed Jun  6 12:33:25 2012
> Date: Wed, 06 Jun 2012 10:28:19 -0700
> From: "Thomas D. Dean" <[hidden email]>
> To: [hidden email]
> Subject: Why Clang
>
> Has the discussion on why change to clang been made available?
>
> I would like to know the reasoning.

There were several reasons;
  1) the proliferation of "non-standard" things that the GNU crowd calls
     'features' in newer versions of the compiler -- some of which actually
     break 'standards compliant' code.
  2) The proliferation of situations under which newer versions of the GCC
     compiler generate 'bad code' -- code that does *NOT* do what it is
     supposed to do.
  3) The GPL, version *3* -- which applies to all newer versions of the
     GCC compiler -- is unacceptable to a large part of the FreeBSD community.

Items 1) and 2) were ongoing nuisances.  Item 3) all by itself, was the deal
breaker.

clang was selected over alternatives -- including keeping the 'old' (GPL v2)
GCC, on the basis of:
  a) better standards compliance.
  b) *FAR* better error messages.
  c) guality of generated code.
  d) 'non-restrictive' licensing.


The GPL V3 has been responsible for a lot of people, besides FreeBSD, going
looking for alternatives to any GPL-licensed code. GNU is well on the way
to 'radicalizing' itself out of significance.    They would rather be
ideologically pure than 'widely accepted'.  It _is_ their right to do so,
but it makes life 'difficult' for those who have interests in building
profit-based products using their tools.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Wojciech Puchar-5
In reply to this post by Thomas D. Dean

> Has the discussion on why change to clang been made available?
>
> I would like to know the reasoning.

CLANG isn't GNU licenced. Getting rid of communist licence is right, but
still it should not be the prime reason for doing things, as having GNU
licenced gcc doesn't really hurt.

personally i don't see CLANG anyhow better for now. AFAIK it is even more
bloated than gcc


> Or, is it simply a gratuitous  change?
>
> Tom Dean
> _______________________________________________
> [hidden email] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[hidden email]"
>
>
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Wojciech Puchar-5
In reply to this post by Matthew Seaman-5
>
> Clearly an update was necessary.  Unfortunately, later versions of gcc
> have switched to GPLv3, which is a viral license and unacceptable to the
> FreeBSD project.

wasn't aware of that.

>
> Therefore clang was chosen from amongst a number of alternatives as the
> best replacement.  That makes it sound as if clang is a second class
> option compared to recent gcc, but this is certainly not the case:
> results from clang are comparable to the latest gcc versions and the
> design of clang is such that further optimizations and improvements can
> be readily incorporated.

and - at least for now - clang itself is very slow. But produces not worse
(or better) code than gcc.

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Mark Felder-4
On Sat, 16 Jun 2012 11:17:19 -0500, Wojciech Puchar  
<[hidden email]> wrote:

> and - at least for now - clang itself is very slow. But produces not  
> worse (or better) code than gcc.

Clang is consistently faster at compiling than GCC and it is very clean  
and modular -- not bloated.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Wojciech Puchar-5
>
> Clang is consistently faster at compiling than GCC and it is very clean and
> modular -- not bloated.

-r-xr-xr-x  3 root  wheel  37025016 12 cze 21:46 /usr/bin/clang

well..


_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Mark Blackman-4

On 17 Jun 2012, at 21:13, Wojciech Puchar wrote:

>>
>> Clang is consistently faster at compiling than GCC and it is very clean and modular -- not bloated.
>
> -r-xr-xr-x  3 root  wheel  37025016 12 cze 21:46 /usr/bin/clang
>
> well..

hope you just left the debugging symbols in and statically linked it…

- Mark_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Wojciech Puchar-5
>>> Clang is consistently faster at compiling than GCC and it is very clean and modular -- not bloated.
>>
>> -r-xr-xr-x  3 root  wheel  37025016 12 cze 21:46 /usr/bin/clang
>>
>> well..
>
> hope you just left the debugging symbols in and statically linked it?
standard FreeBSD built, assumed freebsd build system do the right things.
test done with SSD disk so I/O time are insignificant.

/usr/bin/clang: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 9.0 (900506), stripped

/usr/bin/clang:
         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x802b58000)
         libm.so.5 => /lib/libm.so.5 (0x802e68000)
         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x803089000)
         libc.so.7 => /lib/libc.so.7 (0x803296000)



[wojtek@wojtek ~]$ ls -l /usr/libexec/cc1*
-r-xr-xr-x  1 root  wheel  6265360 12 cze 21:46 /usr/libexec/cc1
-r-xr-xr-x  1 root  wheel  6813856 12 cze 21:46 /usr/libexec/cc1plus

[wojtek@wojtek ~]$ file /usr/libexec/cc1*
/usr/libexec/cc1:     ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 9.0 (900506), stripped
/usr/libexec/cc1plus: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 9.0 (900506), stripped

[wojtek@wojtek ~]$ ls -l /usr/bin/cc
-r-xr-xr-x  2 root  wheel  450184 12 cze 21:46 /usr/bin/cc
[wojtek@wojtek ~]$ ls -l /usr/bin/cpp
-r-xr-xr-x  2 root  wheel  199304 12 cze 21:46 /usr/bin/cpp



that's about bloat.

now about speed: compiling time of my custom kernel (just kernel, no modules, -j 2)

gcc:
real    2m2.880s
user    3m35.788s
sys     0m23.799s


makeoptions CC="clang" :
real    2m8.511s
user    3m48.025s
sys     0m22.602s



resulting programs (gzip as example,stripped, dynamic link):
-rwxr-xr-x  1 root  wheel  36792 18 cze 14:53 gzip.cc
-rwxr-xr-x  1 root  wheel  36728 18 cze 14:53 gzip.clang

speed test (compression -9 to /dev/null of 4GB file - windows XP image in
virtualbox):

gzip.clang:
[root@wojtek ~/NOBACKUP]# time ./gzip.clang -9c
/home/wojtek/NOBACKUP/Winda.part1 >/dev/null

real    9m17.495s
user    8m59.466s
sys     0m5.724s

gzip.cc:
[root@wojtek ~/NOBACKUP]# time ./gzip.cc -9c
/home/wojtek/NOBACKUP/Winda.part1 >/dev/null

real    9m26.206s
user    9m2.700s
sys     0m7.551s




clang is slightly slower (nearly comparable) to gcc, produced similar
sized code, that executes in similar speed (<0.5% difference in CPU time),
while clang itself is 5 times bigger.

sometimes spending just a few minutes to CHECK how things are is far
better than following a hype. I would say not just sometimes, but always.


Don't forget that gcc is result of much over 20 years of constant
patching, modifying, adding and changing the same code which MUST result in bloat
and inefficiency.

Clang written recently with "fresh look" resulted in no faster, but far
more bloated program. quite strange IMHO, think what will be within 5
years.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Mark Felder-4
In reply to this post by Wojciech Puchar-5
On Sun, 17 Jun 2012 15:13:05 -0500, Wojciech Puchar  
<[hidden email]> wrote:

>>
>> Clang is consistently faster at compiling than GCC and it is very clean  
>> and modular -- not bloated.
>
> -r-xr-xr-x  3 root  wheel  37025016 12 cze 21:46 /usr/bin/clang
>
> well..
>

# ls -la /usr/local/bin/clang
-rwxr-xr-x  1 root  wheel  14360344 Jun 18 09:57 /usr/local/bin/clang
# ls -la /usr/bin/clang
-r-xr-xr-x  3 root  wheel  32578976 Jun 18 09:12 /usr/bin/clang


Looks like FreeBSD's current base build includes debugging/symbols even in  
-RELEASE. I'm sure there's a reason for this.


# ls -la /usr/bin/g++
-r-xr-xr-x  3 root  wheel  199208 May 22 14:26 /usr/bin/g++
# ls -la /usr/bin/clang++
-r-xr-xr-x  3 root  wheel  32578976 Jun 18 09:12 /usr/bin/clang++
# ls -la /usr/local/bin/clang++
lrwxr-xr-x  1 root  wheel  5 Jun 18 09:57 /usr/local/bin/clang++ -> clang

FreeBSD and Ports installation method of CLANG differs further here

# stat -x /usr/bin/clang
   File: "/usr/bin/clang"
   Size: 32578976     FileType: Regular File
   Mode: (0555/-r-xr-xr-x)         Uid: (    0/    root)  Gid: (    0/    
wheel)
Device: 85,3144417526   Inode: 23483    Links: 3
Access: Tue May 22 14:27:20 2012
Modify: Mon Jun 18 09:12:53 2012
Change: Mon Jun 18 09:12:53 2012
# stat -x /usr/bin/clang++
   File: "/usr/bin/clang++"
   Size: 32578976     FileType: Regular File
   Mode: (0555/-r-xr-xr-x)         Uid: (    0/    root)  Gid: (    0/    
wheel)
Device: 85,3144417526   Inode: 23483    Links: 3
Access: Tue May 22 14:27:20 2012
Modify: Mon Jun 18 09:12:53 2012
Change: Mon Jun 18 09:12:53 2012


Yup, so Ports symlinks (without full path -- this should be fixed) and  
FreeBSD BASE uses a hardlink.

# ldd /usr/local/bin/clang
/usr/local/bin/clang:
         libLLVM-3.0.so => /usr/local/lib/libLLVM-3.0.so (0x80155e000)
         libthr.so.3 => /lib/libthr.so.3 (0x802ea0000)
         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x8030c3000)
         libm.so.5 => /lib/libm.so.5 (0x8033d3000)
         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x8035f4000)
         libc.so.7 => /lib/libc.so.7 (0x803801000)
# ldd /usr/bin/clang
/usr/bin/clang:
         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x80269e000)
         libm.so.5 => /lib/libm.so.5 (0x8029ae000)
         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x802bcf000)
         libc.so.7 => /lib/libc.so.7 (0x802ddc000)
# ls -la /usr/local/lib/libLLVM-3.0.so
-rwxr-xr-x  1 root  wheel  27543632 Jun 18 09:53  
/usr/local/lib/libLLVM-3.0.so
# ls -la /lib/libthr.so.3
-r--r--r--  1 root  wheel  101712 May 22 14:26 /lib/libthr.so.3

So from what I can tell LLVM is the monster here, not Clang (which is also  
of significant size, but it's 2012 so Clang isn't *that* big)

None of this seems very relevant, but here's also lines of code via  
sloccount:

# sloccount clang-3.0.src/
Totals grouped by language (dominant language first):
cpp:         390865 (82.34%)
ansic:        50466 (10.63%)
objc:         24970 (5.26%)
python:        5874 (1.24%)
perl:          1951 (0.41%)
lisp:           379 (0.08%)
pascal:         123 (0.03%)
sh:              86 (0.02%)
Total Physical Source Lines of Code (SLOC)                = 474,714

# sloccount llvm-3.0.src/
Totals grouped by language (dominant language first):
cpp:         468021 (75.80%)
asm:         109345 (17.71%)
ansic:        13782 (2.23%)
sh:           12848 (2.08%)
ml:            4716 (0.76%)
python:        4351 (0.70%)
perl:          2093 (0.34%)
pascal:        1566 (0.25%)
exp:            389 (0.06%)
lisp:           187 (0.03%)
csh:            117 (0.02%)
Total Physical Source Lines of Code (SLOC)                = 617,415

# sloccount gcc-4.2.1/
Totals grouped by language (dominant language first):
ansic:      1306440 (43.95%)
ada:         584415 (19.66%)
java:        583316 (19.62%)
cpp:         346603 (11.66%)
asm:          37548 (1.26%)
f90:          36055 (1.21%)
sh:           30089 (1.01%)
yacc:         15006 (0.50%)
exp:          11218 (0.38%)
fortran:       7139 (0.24%)
objc:          6921 (0.23%)
perl:          3038 (0.10%)
pascal:        1194 (0.04%)
cs:             879 (0.03%)
lex:            857 (0.03%)
awk:            732 (0.02%)
python:         582 (0.02%)
tcl:            271 (0.01%)
haskell:         93 (0.00%)
lisp:            59 (0.00%)
Total Physical Source Lines of Code (SLOC)                = 2,972,455


So GCC 4.2.1 is nearly 3 million lines of code, but CLANG+LLVM is sitting  
at 1.1 million lines of code.

Are you sure CLANG is the bloated project?
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Wojciech Puchar-5
> Are you sure CLANG is the bloated project?
already posted comparision.
your seems like too much propaganda.

I don't say clang is just bad, but i prefer real data over hype.

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Mark Felder-4
On Mon, 18 Jun 2012 10:50:37 -0500, Wojciech Puchar  
<[hidden email]> wrote:

> I don't say clang is just bad, but i prefer real data over hype.

This is the most memorable and impacting set of graphs that I remember. I  
haven't followed the data much since.

http://clang.llvm.org/performance-2008-10-31.html

Now imagine having to rebuild projects constantly during your dev cycle.  
The time savings is going to add up quick.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Wojciech Puchar-5
>> I don't say clang is just bad, but i prefer real data over hype.
>
> This is the most memorable and impacting set of graphs that I remember. I
> haven't followed the data much since.
>
> http://clang.llvm.org/performance-2008-10-31.html
>
> Now imagine having to rebuild projects constantly during your dev cycle. The
> time savings is going to add up quick.

still not read my mail where i actually compared it in real. or don't
want?

I really don't care about cool graphs but at facts for me as a USER (not
developer) of C compiler.

And the facts are: Lots of worktime were spent to make new C compiler from
scratch and this resulted with thing 5 times larger, working at similar
speed and producing similar code to GCC that is already considered bloat.

Not something to be proud about.

That's truth. and truth is the only thing i do care about. I leave hype
and propaganda and cool graphic bars that shows a really not important
part of C compiler performance - code parsing and generating unoptimized
code (-O0).

The truth is sad. Starting from fresh and not being able to beat 25-year
old bloated gcc is just funny.


That's my view - as a final "consumer", not developer. My view is that
bloatware is replaced by another bloatware, which - because of it's young
age - have greater future potential of bloat than GCC.


This tens or hundreds of thousands of work-hours could be spent far better
by getting latest gcc available on GPLv2 licence and start from there,
just improving it.

GNU communist licence for C compiler is not bad at all (contrary to other
software).
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Mark Felder-4
On Mon, 18 Jun 2012 11:37:55 -0500, Wojciech Puchar  
<[hidden email]> wrote:

> This tens or hundreds of thousands of work-hours could be spent far  
> better by getting latest gcc available on GPLv2 licence and start from  
> there, just improving it.

We already have the latest available with GPLv2, which is very far behind  
and it requires GCC codebase experts to make any changes at all. This is  
equivalent to letting any random coder make major changes to OpenSSL --  
you simply cannot afford to risk it.

Yes, I noticed you showed a few benchmarks where Clang was slower. It's  
bound to be a bit slower with some test cases at first -- they're rounding  
out the features before going back for major optimizations. It won't be  
long and it will be sufficiently on par if not exceeding GCC's  
capabilities. Writing a compiler is no trivial task, and they've built the  
right framework and have a very active community.

Listen, Apple has a MAJOR investment in Clang/LLVM. They simply would not  
allow major across-the-board speed regressions to happen during the  
release of iOS or OSX. They're going to throw tons of time and money to  
make it destroy GCC and target any ARCH they have the slightest interest  
in. Clang has a very bright future, so don't be so discouraged.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Why Clang

Wojciech Puchar-5
>
> We already have the latest available with GPLv2, which is very far behind and
> it requires GCC codebase experts to make any changes at all. This is
> equivalent to letting any random coder make major changes to OpenSSL -- you
> simply cannot afford to risk it.
so not doing anything and just spent that time drinking beer seems to be
better.

Anyway "far behind" gcc is roughly as good as "leading edge" clang.

Actually - lots of time spend and zero gain.

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
1234 ... 11