Clang builds a working 2.6.36 Kernel
Clang builds a working 2.6.36 Kernel
Posted Oct 26, 2010 14:37 UTC (Tue) by juliank (guest, #45896)In reply to: Clang builds a working 2.6.36 Kernel by tzafrir
Parent article: Clang builds a working 2.6.36 Kernel
> you remove "__attribute__((noinline))". This looks
> like a simpler explanation for the simpler code you posted there.
Then gcc calculates the result of f() at compile-time and just has a constant integer in the assembler code. Clang does not appear to do this (there's callq f in clang's assembly)
Posted Oct 26, 2010 16:29 UTC (Tue)
by gmaxwell (guest, #30048)
[Link] (3 responses)
"But.. why did you handicap GCC?"
"Cause if I didn't GCC was much faster!"
(just saying
:) )
Posted Oct 26, 2010 16:31 UTC (Tue)
by juliank (guest, #45896)
[Link] (1 responses)
GCC 4.5 at -O3 is as fast as clang, although not if you call the function via a pointer. GCC 4.4 has the same slow speed at -O2, -O3, -O4, -O9.
Posted Oct 27, 2010 9:27 UTC (Wed)
by jwakely (subscriber, #60262)
[Link]
GCC 4.5 has apparently already improved. Are you also comparing with a version of Clang from 18 months ago, when GCC 4.4 was released?
Posted Oct 26, 2010 21:47 UTC (Tue)
by tzafrir (subscriber, #11501)
[Link]
Clang builds a working 2.6.36 Kernel
Clang builds a working 2.6.36 Kernel
> "But.. why did you handicap GCC?"
> "Cause if I didn't GCC was much faster!"
> (just saying
:) )
Clang builds a working 2.6.36 Kernel
Clang builds a working 2.6.36 Kernel
