Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

LLVM is a shit compiler

Name: Anonymous 2010-07-23 12:55

It's worse than GCC 4.5 in terms of speed, and that says A LOT

Name: Anonymous 2010-07-23 13:00

>>1
nipaaaaaaaaaaaaaa~~~~~~~~

Name: Anonymous 2010-07-23 13:20

you should've written your own when you were 12 and what is this

Name: Anonymous 2010-07-23 19:01

LLVM is not a compiler. HTH, HAND.

Name: Anonymous 2010-07-23 22:31

>>4

Hanus?

Name: Anonymous 2010-07-24 8:07

--enable-optimized
    Enables optimized compilation (debugging symbols are removed and GCC optimization flags are enabled).
    Note that this is the default setting if you are using the LLVM distribution. The default behavior of an
    Subversion checkout is to use an unoptimized build (also known as a debug build).

Name: Anonymous 2010-07-24 8:17

>>6
Vroom! Vroooom!

Name: Anonymous 2010-07-24 9:21

GCC has a lot of momentum, but at some point LLVM should start gaining mind share among compiler researchers. Who really wants to work with the GCC code?

Name: Anonymous 2010-07-24 9:38

>>6
Who gives a shit about Subversion?

Name: Anonymous 2010-07-24 9:42

>>9
If you want to try Clang you do.

Name: Anonymous 2010-07-24 14:36

>should start gaining mind share among compiler researchers
Just like academic languages

Name: Anonymous 2010-07-26 13:31

optimized code > compiler speed

Name: Anonymous 2010-07-26 13:44

>>12
This more than anything else.  Hell, if compilation takes so long as to be noticeable, just let it run while you're at the store or sleeping or whatever.

Name: Anonymous 2010-07-26 14:29

Name: Anonymous 2010-07-26 14:32

>>14
Rob Pike wants to end those days. Fuck that guy.

Name: Anonymous 2010-07-26 14:39

Name: Anonymous 2010-07-26 16:02

>>10
There are a few distros that have clang packages that aren't built from subversion, including OS X, FreeBSD, and Arch Linux.

Name: Anonymous 2010-07-26 16:19

>>14
Fuck off, Randall.

Name: Anonymous 2010-07-26 16:24

>>18
Is it sad that I can tell a bolded spoilered Randall from the width alone?

Name: Anonymous 2010-07-26 17:06

>>19
Are you viewing /prague/ in monospace?

Name: Anonymous 2010-07-26 17:27

>>20
If he were, it'd be miraculous that he could tell its font-width.

Name: Anonymous 2010-07-26 17:39

>>20
No, but I'm not using disproportional font either.

Name: Anonymous 2010-07-27 3:36

I've tried LLVM mingw and it doesn't compile anything:
..\llc: test.c:4:1: error: expected top-level entity
#include <stdio.h>
^

Name: Anonymous 2010-07-27 4:10

Name: Anonymous 2010-07-27 4:39

Ok, not impressed. Code 15% slower than GCC

Name: Anonymous 2010-07-27 4:55

They should port JavaScript to LLVM

Name: Anonymous 2010-07-27 5:42

>>26
They target C/C++ programmers. This is stupid, since established  native compilers which don't need a vm/bytecode can outperform them easily(unlike VM languages)

Name: Anonymous 2010-07-27 7:29

>>26
Already done. Except the LLVM is ported to JavaScript.
http://github.com/omo/jsllc

Name: Anonymous 2010-07-27 8:11

The two problems with LLVM: its in Sepples and sponsored by Apple.

Name: Anonymous 2010-07-27 11:09

>>29
If you've seen the kind of shit that the FSF pulls in its management of GCC, you'd welcome a different organization, even Apple, backing your compiler of choice.  The FSF sabotages the modularity of GCC out of ideological devotion to the GPL.  Why does GCC have no accessible intermediate language?  Because then someone could write a closed-source frontend, backend, or optimization stage for it.  GCC is an utter piece of shit if you want to try and add support for new languages or platforms.

Name: Anonymous 2010-07-27 11:36

Linuxare: To what extent does the basic architecture of GCC need changes to support the language front-ends, such as the new GCC Java compiler?

Richard: I don't know anything about what's happening with the Java compiler. I stopped dealing with GCC around 1992 and I don't know what changes, if any, were needed. Some changes were needed mainly in the tree data structure, which is what programs get parsed into. Occasionally, when you handle a language that has the kind of construct that hasn't been handled before, if there's no way to represent it with the existing tree data structure, you need to add something so you can represent it. Things like methods and core methods needed a way to be represented, so we added them.

Linuxcare: Does GCC still use a LISP-like intermediary language?

Richard: Printed syntax is what's LISP-like. It's not really LISP-like in the sense that it consists of tupelos that point to a number of other tupelos, which is not by any means a new format for priority use. It's printed out in a LISP-like syntax because that makes it easy to work with in EMACS.

Linuxcare: How did you come to choose LISP as the EMACS engine?

Richard: LISP is the most powerful programming language, and if you want an interpreter, LISP is the best. None of the other languages come anywhere near LISP in their power. The most exciting things about LISP are read, eval, and print. If you look at other languages, they have no equivalent for any of those.

Name: Anonymous 2010-07-27 12:00

This thread has been beautifully segued into the following:
Name: Anonymous
Email:
Subject: Typing LISP in lowercase letters

Message: It doesn't work.

Name: Anonymous 2010-07-27 12:09

>>32
Lisp.

Name: Anonymous 2010-07-27 12:23

>>33
It just doesn't work.

Name: Haxus The Lexus 2010-07-27 12:31

Haxus The Lexus

Name: Haxus the Lexer 2010-07-27 17:10

Haxus the Lexer

Name: Anonymous 2010-07-28 13:49

>>31
tupelos

Name: Anonymous 2010-07-28 13:52

The most exciting things about LISP are read, eval, and print. If you look at other languages, they have no equivalent for any of those.
JavaScript: prompt, eval, alert
Perl: <>, eval, print

"no equivalent" MY ANUS

Name: Anonymous 2010-07-28 14:01

>>38
You are very wrong. Either you are trolling, or you have no idea how Lisp works.

read parses a line of input into an s-expression. It does not return a string.
eval evaluates an already-parsed s-expression. It does not operate on strings.
print outputs an s-expression. It does not process strings. (That is, (print "hello") will output "hello" with the quotation marks intact.)

Name: Anonymous 2010-07-28 14:01

>>38
has never used Lisp if he thinks those are eqv?

Name: Anonymous 2010-07-28 14:07

>>38
you mena print eval(<>) or die "FUCKING NIGGERS\n";

Name: Anonymous 2010-07-28 14:13

>>41
back to /vip/ please

Name: Anonymous 2010-07-28 14:19

>>42
nah

Name: Anonymous 2010-07-28 14:24

>>39
Those languages use strings (which are more general and powerful than s-expressions) where LISP uses s-expressions.

Name: Anonymous 2010-07-28 14:27

>>44
W-D

Name: Anonymous 2010-07-28 14:32

>>44
FrozenVoid?

Name: Anonymous 2010-07-28 14:36

>>44
weak

Name: Anonymous 2010-07-28 14:44

>>47
u jus got ownd bitx

Name: Anonymous 2010-08-02 20:25

Jesus, GCC really is NOT THAT BAD, it even shows bench marks that are faster than Intel in some cases. Grow up and leave.

Name: Anonymous 2010-08-02 20:48

>>49
Did you really need to bump a dead thread to declare this?

Name: Anonymous 2010-08-02 21:02

>>49
That's right. GCC works and is adequate. Certain metrics may compare worse to other compilers and that's fine to me. If I require something specific, I can get GCC fixed to meet that requirement.

Name: Anonymous 2010-08-02 21:13

>>51
How about adding support for a new language to GCC?  That, sir, is an utter PITA.  LLVM exposes its back end to anyone who wants to use it.  (Insert anal sex joke here.)

Name: Anonymous 2010-08-02 21:36

EXPOSE MY ANUS

Name: Anonymous 2010-08-02 22:34

>>52
I can't help but notice the 'PITA'/exposed back end parallel. GCC: dom, LLVM: sub -? Mayhaps they will hook up and make sexytimes.

Name: Anonymous 2010-08-03 2:35

Y'all ignoring the fact that clang's error reporting facilities are much, MUCH better than the garbage gcc (or worse, g++) throws back at you.

http://blog.llvm.org/2010/04/amazing-feats-of-clang-error-recovery.html

There's your killer feature.

Also, gcc had a decade head start. Since LLVM's backend isn't intentionally obfuscated like gcc's and uses a clean IR that's especially designed to facilitate optimization, it will eventually overtake gcc in speed and reliability.

Name: Anonymous 2010-08-03 6:28

LLVM isn't worse than GCC. If you build it for release mode and use the Clang front-end, it's both a faster compiler and generates much faster code (granted that you build native machine executables, not LLVM bytecode executables).

The fact that you claim otherwise just shows that you're an amateur.

GCC also really sucks at ARM code generation still after all of these years, and Clang/LLVM is really shining here. I recently came up with a fast 3-term cross-product using NEON intrinsics.


float32x4_t cross3(float32x4_t v1, float32x4_t v2) {
    float32x4x2_t xxyyzz1 = vzipq_f32(v1, v1);
    float32x4x2_t xxyyzz2 = vzipq_f32(v2, v2);   
    float32x2_t xx1 = vget_low_f32(xxyyzz1.val[0]);
    float32x2_t yy1 = vget_high_f32(xxyyzz1.val[0]);   
    float32x2_t zz1 = vget_low_f32(xxyyzz1.val[1]);
    float32x2_t xx2 = vget_low_f32(xxyyzz2.val[0]);
    float32x2_t yy2 = vget_high_f32(xxyyzz2.val[0]);   
    float32x2_t zz2 = vget_low_f32(xxyyzz2.val[1]);

    float32x2_t x = vmul_f32(yy1, zz2); // x' = v1.y * v2.z
    float32x2_t y = vmul_f32(zz1, xx2); // x' = v1.z * v2.x 
    float32x2_t z = vmul_f32(xx1, yy2); // x' = v1.x * v2.y
    x = vmls_f32(x, zz1, yy2);          // x' = x' - v1.z * v2.y
    y = vmls_f32(y, xx1, zz2);          // y' = y' - v1.x * v2.z
    z = vmls_f32(z, yy1, xx2);          // z' = z' - v1.y * v2.x

    float32x2x2_t result = vuzp_f32(x, y);
    return vcombine_f32(result.val[0], z);
}


GCC 4.5 generates the following shit:


        vmov    d27, r2, r3
        vmov    d20, d6
        vmov    d2, d26
        vmov    d3, d7
        vzip.32 q2, q3
        vmov    d17, d27
        vmov    d24, d6
        vmov    d25, d1
        vzip.32 q12, q10
        vmov    d22, d5
        vmov    d23, d2
        vmov    d18, d1
        vmov    d19, d20
        vmul.f32 q1, q11, q12
        vmov    d16, d4
        vmov    d17, d5
        vmul.f32 d16, d20, d6
        vmul.f32 d18, d17, d18
        vmul.f32 d17, d23, d5
        vmov    d18, d1
        vmov    d19, d20
        vmls.f32 d16, d3, d5
        vmls.f32 d18, d0, d6
        vmov    d1, d24
        vmls.f32 d17, d1, d4


And Clang/LLVM generates the optimal sequence, exactly what I would have wrote if I were to do it by hand:


        vmov    q1, q0
        vmov    q3, q2
        vzip.32 q0, q1
        vzip.32 q2, q3
        vmul.f32 d16, d1, d6
        vmul.f32 d18, d3, d4
        vmul.f32 d17, d0, d5
        vmls.f32 d16, d3, d5
        vmls.f32 d18, d0, d6
        vmls.f32 d17, d1, d4

Name: Anonymous 2010-08-03 7:07

GCC still wins at general program speed(big programs not benchmarks).
IIRC llvm incurs 15-10% speed loss vs GCC in most of them(and about -10% more if we compare with Intel C++ which has somewhat better optimizer).

Name: Anonymous 2010-08-03 7:13

>>57
Sounds like you're citing the recent SPEC2000 benchmarks which used the GCC-LLVM frontend instead of Clang.

Name: Anonymous 2010-08-03 9:14

>>57
I really don't buy those numbers. A 10-(25)% speed reduction would place it *way* down the ranks.

Name: Anonymous 2010-08-03 9:23

Name: Anonymous 2010-08-03 15:54

>>60
That isn't new information to anyone.

Don't change these.
Name: Email:
Entire Thread Thread List