Slashdot Mirror


IBM Releases Compiler for Power4 and G5

davids-world.com writes "IBM offers its optimized XLC compiler not just for Intel CPUs, but also for its own G5 processor (article in German at Heise). Unlike gcc, it is optimized for the G5 and achieves a major boost in speed, as first results show. I guess we will have to compare the new benchmark data (once available) with the data we get with the optimized Intel compiler for Xeon. The compiler is available for download now."

27 of 471 comments (clear)

  1. Does it integrate with current DevEnvs? by Anonymous Coward · · Score: 0, Interesting


    Does it integrate with ProjectBuilder, XCode or CodeWarrior?
    I don't know, you tell me. If not, who will use it?

    AndY

  2. What license is this under? by burgburgburg · · Score: 4, Interesting

    This is a preview beta. What will the final product be released under?

  3. why don't they just improve gcc? by 7-Vodka · · Score: 1, Interesting

    Is there some good reason why IBM doesn't just improve gcc? I mean, apple uses gcc; free software users use gcc.. Gcc is a complete compiler suite.
    Why didn't they just submit some patches? : )

    --

    Liberty.

    1. Re:why don't they just improve gcc? by WatertonMan · · Score: 2, Interesting
      In addition to the many other answers about why there is an xlc rather than an updated gcc, let me offer a few others. One is that xlc allows IBM to keep its technology internal. No viral open source license. Further even Apple's gcc isn't your mother's gcc. They have their own fork because some of their changes weren't accepted.

      One must also point out the obvious that simply adding to someone else's code isn't always possible. You can't always just pick and choose like that. If you've never had to "fix" someone else's code you may not realize this. There are all sorts of different design decisions. That xlc basically is command line compatible with gcc is all I need.

      Here's the real question. Will Apple move Project Builder away from gcc to xlc. I just downloaded it and haven't tried it, but I wonder if one could alias gcc to xlc.

      BTW - to someone who knows. Is xlc compatible with gdb? I'd assume so, but wonder if anyone there knows for sure.

  4. A Discussion over at Ars... by sockit2me9000 · · Score: 1, Interesting

    located here says that people are seeing nearly a twofold increase in both G4's and G5's. I lifted this next spec directly from their discussion: (XL improvement over Absoft and GCC 3.3): Type of Code G4 G5 Scalar +70% +210% Vector +40% +70% _If this holds that places his _2.0GHz G5 (single)_=254 at _787__ Note also that the _P4 2.66_ is _255_. This is a big deal. Let's just hope they use this to compile the OS.

  5. What about Xcode? by jared_hanson · · Score: 3, Interesting

    Xcode, the new compiler/IDE, which is based on gcc, is also optimized for the G5.

    For more information, see Apple's Xcode site.

    --
    -- Fighting mediocrity one bad post at a time.
  6. Questions. by emil · · Score: 4, Interesting
    1. Can this compiler be used on any open-source unix-like kernels? I know that Linux has some hooks into gcc.
    2. Can this compiler be used to prepare glibc or any other major C libraries?
    3. Can this compiler be used to generate native Mac OS X GUI applications (cocoa)?
    4. Will the source be released?

    It is good to see IBM ending the habit of charging extra for the C compiler. AIX hasn't bundled the compiler since 3.2.5.

  7. Re:Why? by Theaetetus · · Score: 5, Interesting
    I'd imagine one could cook up code to make whichever machine they want look "faster".

    Um, that's the point. IBM cooks up code to make the G5 look as fast as possible. Intel cooks up code to make the Xeon looks as fast as possible. Now compare. Fastest code/chip against the competition's fastest code/chip. The complaint in the past was that it was always the fastest code/chip of one side against a non-optimized code on the other side. Now we can have a fair shootout.

    -T

  8. Re:Here we go again: by smittyoneeach · · Score: 1, Interesting

    Since OS X.x has BSD underpinnings, why not just compile it on x86?
    Running OS X.x with MS Orifice seems like the sweet spot for stable OS/file format compatibility in the proprietary world...

    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
  9. Interesting, but... by Doktor+Memory · · Score: 4, Interesting

    I wonder how the AltiVec support in XLC for OSX compares to that in GCC?

    This is actually really important. One of the big reasons that the Intel C compiler spanks every other available x86 compiler is that its SSE/SIMD support is, in the words of one of my assembly-programmer friends, "awe-inspiring." Like, unrolling entire program loops and replacing them with single SIMD instructions.

    As far as I know, pretty much all of the AltiVec/VMX support in GCC was contributed by Apple and Motorola, and prior to the ppc970, IBM has never produced a PPC CPU with AltiVec instructions, so prior versions of XLC have never had to support it. So I'll be really curious to hear how it stacks up against GCC's Altivec.

    --

    News for Nerds. Stuff that Matters? Like hell.

    1. Re:Interesting, but... by PCM2 · · Score: 2, Interesting
      I wonder how the AltiVec support in XLC for OSX compares to that in GCC?
      My understanding was that GCC did little to nothing in the way of AltiVec optimization of "straight" C code. You have to write the AltiVec instructions yourself. The cool thing about AltiVec is that you don't have to write the vector code in assembly, you can do it in C. But still, it's not like you can (for example) flip on the AltiVec support in GCC, compile LAME, and have an AltiVec-enabled MP3 encoder. Somebody still has to come along and port the code to AltiVec (please, please)...
      --
      Breakfast served all day!
  10. Re:So much for open source at IBM by Tal+Cohen · · Score: 4, Interesting

    (Disclaimer: I used to work for IBM Research. This is not inside info.)

    The XL line of compilers has a long and glorious tradition. What matters most here is compatibility with existing code. IBM doesn't optimize XLC so you could get a faster kernel, it optimizes XLC so they could recompile DB/2 on AIX and get faster results; and also, obviously, for many of their other products. Another consideration is those clients that have a large codebase used with XLC.

    The world of C/C++ is rather sad in that code is not only non-cross-platform in most cases, it is also commonly unlikely to compile using a different compiler on the same platform. Moving from XLC to gcc would mean throwing away an investment of decades in the compiler, not to mention the huge amount of work required to port the source code of products such as DB/2. So IBM helps gcc, and also invests in XLC. There's no conflict here. I would not be surprised if many of the various optimizations employed by XLC will eventually find their way to gcc -- by the very same IBM researchers.

    BTW, talking of optimizations, people in IBM Haifa have developed an amazing post-compile optimization tool

    . Now, seeing an open-source version of that would be cool. Not very likely, though, since this is the source for some of the performance edge DB/2 has over its competitors.
    --
    - Tal Cohen
  11. Re:So much for open source at IBM by p3d0 · · Score: 4, Interesting
    And is there a particular reason why IBM couldn't apply their work towards gcc? So much for the whole open-source, contribute-to-the-community philosophy.
    Oh please. It's not like there's only one compiler team in IBM. IBM is contributing big time to gcc, and they also maintain their own compiler for customers who want that. IBM, like any smart company, hedges its bets, so they work on multiple overlapping projects. Do you expect them to bet the company on technology they don't control? The kind of reactionary thinking that would have them switch all their manpower to gcc is exactly what kills a lot of less prudent companies.

    Plus, the team working on this compiler would probably take several man-decades---if ever---to become as fluent and comfortable with gcc as they are with their own code.

    (Disclaimer: I work for IBM. In fact, I work on a compiler for IBM, though it's neither this compiler nor gcc. My opinions don't reflect those of IBM.)

    --
    Patrick Doyle
    I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
  12. Re:Here we go again: by nattt · · Score: 2, Interesting

    Virtual PC doesn't run on the G5 because of it's lack of pseudo little endian support.

    --
    -- oldthinkers unbellyfeel ingsoc
  13. Re:Here we go again: by finkployd · · Score: 3, Interesting

    Unless raw CPU isn't your only deciding factor (frankly once you get over 1 GHz I really don't care, I'm not sequencing DNA here :) ). For me I know it is a technically inferior processor, but being able to run OSX was worth the minor trade off in raw CPU speed I got by getting a G4.

    But hey, to each his own.

    Finkployd

  14. Re:So much for open source at IBM by Wesley+Felter · · Score: 2, Interesting

    FDPR is much more advanced that GNU Rope; it actually optimizes the code in addition to reordering it.

  15. I can definitely believe it by TheTranceFan · · Score: 5, Interesting
    I personally ported Macintosh Adobe Premiere 4.0 from 68000 to PowerPC. This was right when the PowerPC-based Macs were introduced (before, actually, since Apple was providing us with prerelease product). At that time, Apple's internal C compiler (then MrC) wasn't ready for primetime, nor was ThinkC. We'd been using MPW for the development, but the only good compiler for PowerPC was IBM's compiler. So I edited/built/linked the whole thing over the network on an RS/6000(?) somewhere at Adobe. I remember when I turned the optimizer on, Premiere got twice as fast, just like that.

    The IBM compiler dis some wild instruction reordering which made the optimized compiled code really hard to understand, but somehow better fitted to the processor's pipeline structure. Fortunately the only thing that broke when I turned on the optimizer was the "marching ants" used for selection, and that was the result of some way-too-fancy-casting of Pattern pointers that fooled the optimizer. I suspect the IBM compilers will continue to reign if performance is the goal.

  16. Re:Here we go again: by Duck_Taffy · · Score: 3, Interesting

    Actually, I work part-time in a lab that does DNA sequencing, and the machines they have doing the sequencing are all Macs, even though there's plenty of Suns and Dells around.

    --
    Karma: Ran over your dogma.
  17. Re:Here we go again: by finkployd · · Score: 2, Interesting

    Huh, maybe I'm all backwards on this then. My understanding from our HPC guys is that Apple hardware is not up to par with that they do. Were the Apple's picked due to processing speed, or software considerations?

    Finkployd

  18. Re:G5 upgrade woes by WatertonMan · · Score: 2, Interesting
    No, this is a valid concern. The Finder is the achilles heel of the Macintosh. I can only say that the Finder has been completely rewritten in Panther. Word on the street is that Panther may be out late in September or early in October. (Who knows if that is true. The word on the street for the past two months has been a new 15" Powerbook as well)

    Anyways, back to your problem. If you copy with the shell or with any other file manager on the Mac it will be considerably faster.

    As for Adobe Acrobat, I don't know what is wrong there. I installed it in just a few minutes without any problems.

    However I must ask if you are for real. Sorry but just today have reports of dual G5's come out. That you "recently upgraded" sounds a bit doubtful. I don't know anyone with a dual G5. That you say your iPod stopped working and Safari isn't working during a copy makes me think either you have a flawed pre-release machine or are just blowing air. My apologies if you are legit. Just doesn't sound right.

  19. Re:can it compile the kernel? by Doktor+Memory · · Score: 2, Interesting

    Very often, that "native" compiler either doesn't exist (because even the vendor is using gcc), or is prohibitively expensive for a startup company.

    It's best to approach GCC like Java: use it to prove the correctness of your app, then profile profile profile and insert inlined assembly into your bottleneck points. Remember your Brooks: 90% of all optimization is premature.

    --

    News for Nerds. Stuff that Matters? Like hell.

  20. bad benchmarks by penguin7of9 · · Score: 2, Interesting

    IBM's benchmarks comparing gcc and xlc on SPECint2000 and SPECfp2000 seem not very meaningful to me. First of all, note that both -O2 and -O3 are semantics preserving in gcc, while -O4 and -O5 in xlc are not. That is, in particular on the SPECint2000 benchmarks, the xlc compiler is faster simply because it changes the behavior of your program. The same may even be true for xlc compiling SPECfp2000 at lower optimization settings; the Intel compiler on P4, for example, achieves large gains in performance on some benchmarks by inlining math functions that gcc uses a library for--because the P4 instructions aren't quite right.

    In my experience, you can usually match the performance of those other "fast" compilers with gcc by using the "-f" and "-m" flags. The main difference is that gcc forces you to be explicit about which semantic changes the compiler is allowed to make, rather than lumping things together under some generic "-O5" setting. That's a good thing.

    (Note that my comments apply to gcc; g77 may well be a much worse performer than commercial Fortran compilers even though it shares the same back-end with gcc. That affects the SPECfp2000 scores. Fortran just doesn't seem to be a high priority for gcc.)

  21. Re:Here we go again: by sniggly · · Score: 2, Interesting

    It's got altivec in the CPU which can speed up vector computations dramatically - photoshop on mac also uses altivec optimalizations which is why its so very fast compared to photoshop on a comparable intel. I bet the dna sequencers use the altivec. (prolly ppc linux w gcc)

    --
    Of those to whom much is given, much is required.
  22. Re:Here we go again: by stingerman101 · · Score: 2, Interesting

    The G4's are much faster for sequencing since they use a better SIMD than the Intel's. Performance wise the G4's rock, and IBM's new compiler for OSX should not only catapult the G5's but benefit the G4's as other benchmarks are already showing. IBM is a much better partner than Motorola for Apple. It's the kind of partner Apple needs to win their competition with Wintel in the enterprise. All of a sudden the G4's are given a new lease on life. Expect to see a G4 equivalent from IBM soon on a 90nm process.

  23. Re:Here we go again: by rsborg · · Score: 4, Interesting
    I'm confused. Newegg claims to sell the Opteron 240 for $300 -- oh wait, I'm out of date -- they're $255 now. Is this a scam or something? I have a hunch it's for real, and they'll actually ship the chips if I pay them.

    Hmm... lets see... you're comparing a processor to a full system. Apples vs. Oranges.
    Lets do some real analysis... top server vs. top server:

    • A fullly specced dual G5 2.0Ghz ... $2770
      vs.
    • a similarly specced dual Opteron 244 1.8Ghz.... $3013
      And this isn't even from big boys like Dell (who wouldn't be caught dead using AMD)... just a bottomfeeder from pricewatch.

    Now, the G5 has all sorts of desktop/workstation goodies built in (Radeon 96/9800 Pro, awesome sound, good looks), and the with AMD server, you can cut corners with things you don't want in a server, like soundcard, highend video card, etc.

    My point? im sure we're still comparing apples to oranges. People who want a mainstream kickass workstation will love to buy the G5. People who want beowulf node clusters or inexpensive uberservers will love the Opteron. I just wish I had either :-)

    --
    Make sure everyone's vote counts: Verified Voting
  24. Re:Here we go again: by Anonymous Coward · · Score: 1, Interesting

    So, here is that compiler.

    Yes, and this is exactly what a lot of us (scientific users) were asking for. Looking at the individual SPECfp benchmarks most similar to our application, we expect about 30-40% improvement over gcc. This puts the Mac almost on par with x86 solutions when it comes to flops/$ (we never pay list price for x86 machines in academia; unfortunately the Apple discount is only 10-20%).

    During the past decade I've been working on Sparc, Alpha, Power4, Pentium, Athlon, and Cray CPUs. Apart from a very short period in the 1990s when then G3 appeared this is the first time Apple is truly competitive.

  25. xCode? CodeWarrior? by MacGod · · Score: 2, Interesting

    What I wonder is whether this compiler will be used in future versions of xCode. If it is, in fact, significantly faster than GCC, it seems logical that Apple would wants it as part of their own developer tools.

    In addition, I wonder what this will do for Metroworks' CodeWarrior compiler?

    --
    "Reality is merely an illusion, albeit a very persistent one " -Albert Einstein