Slashdot Mirror


LLVM 2.2 Released

performance geek writes "LLVM 2.2 was released yesterday! This is the thirteenth public release of the open-source compiler that started as a GCC fork. LLVM supports several aggressive optimizations, in compile-, link- and run-time, and often produces faster (1.5-3x) code than GCC. It is also much faster than GCC at compiling (despite the slow link-time optimizations). Gentoo users are already trying to build the whole system with the LLVM toolchain to get the extra performance bit."

16 of 128 comments (clear)

  1. Re:Apparently not... by Teese · · Score: 4, Informative
    --
    "I'm a Genius!"*


    *Not an actual Genius
  2. LWN alternative gcc article by emj · · Score: 4, Informative

    LWN has discussion on this, and there is a nice video presentation of LLVM 2.0 as well. Cool thing, but as they say it isn't really about replacing GCC.

    1. Re:LWN alternative gcc article by 7-Vodka · · Score: 3, Insightful

      2) A truly free source code license - no viral GPL BS to deal with

      You were doing so well until you spouted this aggregious bullshit line. You're obviously very biased against the GPL since it's a very tough stretch by the M$ marketing department to call it viral.

      That's just as bad as calling copyright infringement "PIRATING". ARRGH ARRGH MATEY! AHOY THERE ON THE OPEN SEAS.
      You idiot.

      --

      Liberty.

    2. Re:LWN alternative gcc article by nuzak · · Score: 3, Insightful

      Maybe they just want it to interface at link level with tools that, I dunno, might not be GPL?

      Naw, they must be The Enemies Of Freedom. That's it.

      --
      Done with slashdot, done with nerds, getting a life.
  3. Good reporting there, submitter by Goaway · · Score: 4, Insightful

    "The open-source compiler that started as a GCC fork"? LLVM is not a compiler. It is a code generator, optimizer and virtual machine, usable as a compiler back-end. It later added a gcc-based front end.

    Also, Apple is currently driving development of an alternate BSD-licensed front end named clang.

    1. Re:Good reporting there, submitter by samkass · · Score: 3, Interesting

      Although Apple states that clang is not designed to replace GCC overall, I would be surprised if Apple wasn't planning on it replacing GCC in their products. It appears to provide more performance, smaller binaries, and a freer license than GCC.

      Apple already reportedly uses it to compile their graphics code so that the same code can run on either a GPU or the CPU regardless of chipset available.

      --
      E pluribus unum
    2. Re:Good reporting there, submitter by LizardKing · · Score: 2, Informative

      That's why Apple used a BSD base as opposed to a Linux base for Mac OS X.

      No, it's because MacOS X is a continuation of NeXTstep, which was based on a BSD userland and Mach kernel (itself originally developed from the BSD Unix kernel circa version 4.3). At the time NeXTstep was originally developed, Linux didn't exist and the GNU userland was still in its infancy. In addition, I've never seen any evidence that Apple considered a move to a Linux base for MacOS X, and considering how solid NeXTstep and OpenStep were I'd be surprised if they did. Licensing would have been an unlikely issue anyway, as NeXTstep always shipped with GCC as part of the development tools and there are a number of GNU tools in MasOS X.

    3. Re:Good reporting there, submitter by larry+bagina · · Score: 5, Informative

      Exactly! From the clang readme. Half of these things are a nice feature for XCode/IDE integration.

      III. Current advantages over GCC:

        * Column numbers are fully tracked (no 256 col limit, no GCC-style pruning).
        * All diagnostics have column numbers, includes 'caret diagnostics', and they
            highlight regions of interesting code (e.g. the LHS and RHS of a binop).
        * Full diagnostic customization by client (can format diagnostics however they
            like, e.g. in an IDE or refactoring tool) through DiagnosticClient interface.
        * Built as a framework, can be reused by multiple tools.
        * All languages supported linked into same library (no cc1,cc1obj, ...).
        * mmap's code in read-only, does not dirty the pages like GCC (mem footprint).
        * LLVM License, can be linked into non-GPL projects.
        * Full diagnostic control, per diagnostic. Diagnostics are identified by ID.
        * Significantly faster than GCC at semantic analysis, parsing, preprocessing
            and lexing.
        * Defers exposing platform-specific stuff to as late as possible, tracks use of
            platform-specific features (e.g. #ifdef PPC) to allow 'portable bytecodes'.
        * The lexer doesn't rely on the "lexer hack": it has no notion of scope and
            does not categorize identifiers as types or variables -- this is up to the
            parser to decide.

      Potential Future Features:

        * Fine grained diag control within the source (#pragma enable/disable warning).
        * Better token tracking within macros? (Token came from this line, which is
            a macro argument instantiated here, recursively instantiated here).
        * Fast #import with a module system.
        * Dependency tracking: change to header file doesn't recompile every function
            that texually depends on it: recompile only those functions that need it.
            This is aka 'incremental parsing'.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

  4. Comment removed by account_deleted · · Score: 3, Informative

    Comment removed based on user account deletion

  5. Extra Performance by Jellybob · · Score: 4, Funny

    Of course the Gentoo users are off recompiling there whole system for the extra performance. It's what they do - why use your computer when you can make it .242% faster with only 15 hours of compiling?

    1. Re:Extra Performance by SanityInAnarchy · · Score: 2, Informative

      Actually, I was correcting the point. TFS claims 1.5x-3x speed improvement over gcc.

      Of course, TFS was also dead wrong about Gentoo users trying to build the whole system. Apparently there's an ebuild to install llvm, which seems like an obvious thing to do. There's also mention of Mesa intending to switch to llvm, and other projects might follow, but those are isolated programs, no more shocking or revolutionary than the fact that Eclipse is written in Java.

      --
      Don't thank God, thank a doctor!
    2. Re:Extra Performance by Just+Some+Guy · · Score: 2, Informative

      There isn't that much performance hidden in there.

      Fortunately for us, compiler researchers say you're wrong. LLVM takes the Java-like approach of seeing what parts of your code can be optimized by gathering runtime profiling information, then using that to dynamically recompile parts of your code that really need it. I'd be surprised if that kind of system couldn't squeeze out quite a bit more performance.

      --
      Dewey, what part of this looks like authorities should be involved?
  6. Re:Apparently not... by cbart387 · · Score: 3, Informative

    Agreed. I've always been taught that you introduce the full meaning of an acronym before you use it. The acronym may make sense to you, but the reader may not have been exposed to it. This is especially applicable on a tech site, where acronyms are rampant. I'm not even including the acronyms seen only on slashdot (which are very off putting to a first time user by the way). Remember: EVERYONE started as a beginner.

    ... just a pet peeve of mine that I can do a mini-rant on without being off-topic ;)

    --
    Lack of planning on your part does not constitute an emergency on mine.
  7. Re:Does it do inline asm yet? by AcidPenguin9873 · · Score: 2, Informative

    LLVM has supported inline asm since release 1.7, and the support has steadily been getting better at each release, with major improvements in 1.8 and 1.9.

    http://llvm.org/releases/1.7/docs/ReleaseNotes.html
    http://llvm.org/releases/

    The only problem with the x86 inline asm support in 2.2 is the lack of support for the x87 floating point stack in the inline asm register constraints. See "Known Problems" in the 2.2 release notes.

  8. Gentoo Users by Enderandrew · · Score: 3, Insightful

    Some Gentoo users just want fine-grained control over their systems. They get exactly the packages they want, configured the way they want, and nothing else. The biggest power of Gentoo isn't compile optimizations, but rather use flags. I want my box to operate exactly how I want it. Gentoo allows me that freedom.

    It does take a good deal more time and effort, but frankly some people enjoy that sort of thing as a hobby, the way others constantly tinker with their car.

    For what it is worth, portage (and the two portage replacements, pauldis and pkgcore) are quite frankly hands down the best package managers out there, and they handle pre-compiled binary packages just as well. I really honestly believe the rest of the Linux world would be greatly benefited by using one package manager, regardless of how they compile or pack their binaries.

    Set a use flag for openSUSE_10.3 and portage knows what packages to grab. It could work.

    --
    http://blindscribblings.com - Tasty pop-culture in conceptual fashion.
  9. Re:one pakage manager to rule them all by Enderandrew · · Score: 2, Insightful

    There are tons of advantages to portage, but the biggest is use flags. It also handles dependencies far better than apt-get, yast, or anything else I've tried. I've run into broken, dependency hell of other systems. That alone is huge.

    You say the packages in Gentoo are horrible. They are source based packages, the same as you'd get with Debian, or Ubuntu, etc. Each distro does often include distro-specific patches with various packages, but not all. However, I'm not sure which packages are so horrible in Gentoo, as we're just talking about source code.

    If you're not familiar with use flags, I can compile in support for qt widgets, gtk widgets, java, etc, or remove any of these features from openoffice as I see fit. Or I can download a precompiled binary of openoffice. With something like apt-get, you can download sources and the recompile the sources, but apt-get has no way to keep track of whether or not you compiled openoffice with ldap support or not. However, Gentoo keeps track of the use flags for dependency purposes, and to make sure all packages of my systems are compiled with the same options. Or I can set a use flag for one package as opposed to globally if I wish.

    Check this out sometime.

    http://paludis.pioto.org/

    --
    http://blindscribblings.com - Tasty pop-culture in conceptual fashion.