Mark Mitchell is one of the people behind CodeSourcery, but he is mostly known for his major contributions on GCC, the Gnu compiler. These days, Mark is the release manager of GCC and he is working hard trying to get GCC 3.1 out of the door. GCC 3.1 is going to be the first truly stable version of the 3.x source branch and many developers are already looking forward for it. Mark talked to OSNews about the new GCC, the future and the competition.1. Are there any plans about making gcc3 emit C++ code that’s binary-compatible with gcc2.x’s ABI? (this is most useful for BeOS, which is “stuck” with Gnu PRO 2.9x as any effort to use GCC 3.x breaks binary compatibility mostly because BeOS is C++ only, or for Qt/wxWindows C++ applications under Unix)
Mark Mitchell: No, there are not. The previous ABI was inferior, from a technical standpoint. In addition, the G++ development team decided that the costs of maintaining two separate ABIs outweighed the benefits from providing that compatibility. Instead, we are focused on minimizing sure that no changes occur in the current ABI so that binary compatibility will be preserved between releases of G++.
2. Are there any plans for supporting the “native” Crusoe instruction set and maybe some more “exotic” CPUs, like the Infineon C166?
Mark Mitchell: Not to my knowledge.
3. Is there an auto-vectorizer for modern CPUs in place? If not, are there plans for something like it?
Mark Mitchell: Not to my knowledge.
4. What are your thoughts about moving the codegen after the linker, to allow for global optimization/inlining?
Mark Mitchell: There are people you are interested in global optimization, including link-time optimization. As far as I know, those people have generally not contemplated moving *all* compilation after linking; instead, they have considered recompiling some portions of the code at that time.
The profile-directed optimizations in GCC provide another approach to this problem. The linker could simply collect information that is then provided back to the GCC the next time the compiler is run.
5. Is gcc3 written in ANSI-C? For example, can it be compiled with any compliant compiler?
Mark Mitchell: The C front end is written in ANSI/ISO C, and can be compiled with almost any C compiler. Some of the other front ends are written using GNU C extensions, and can only be compiled by GCC itself.
6. What about features found in VC++, like recompiling part of an app while it’s running, or incremental linking? Are these features supported?
Mark Mitchell: No, they are not.
7. Are there plans to make gcc emit more warnings than the MsVC which can greatly help programmers?
Mark Mitchell: There are a lot of different points of view on warnings. Lots of warnings can be helpful, but if there are too many “false positives”, i.e., warnings that do not really indicate problems, people stop paying attention to them.
There is work ongoing to improve the overall quality — as well as quantity.
8. What did you think about the Intel Compiler v6 that came out recently? Did you have time to have a look at it?
Mark Mitchell: I do not have enough information about that compiler to comment on it.
9. Regarding the output of gcc, some people say that Intel’s ICC produces up to 30-35% better code. If this is true, what steps the Gcc team will take for further optimizations?
Mark Mitchell: I do not have concrete data about which compiler is faster, although I have heard reports that ICC is faster. The important thing to remember about benchmarks is that what really matters is how fast *your* code runs. The best way to compare two compilers is to compile your code, or code that is representative of your code.
People are always working on new and improved optimizations in GCC. For example, people are working on a new register allocator that should improve performance. The easy part about implementing an optimization is writing code for the algorithm. The hard part is making sure it works on all the architectures supported by GCC, and tuning the algorithm.
10. As a rough estimate, how much better is Gcc 3.x, compared to Gcc 2.x, for the Motorola G3/G4 architecture?
Mark Mitchell: I really do not know how to measure “better”. We believe that GCC 3.1, which will be released very soon, has better language support, fewer bugs, and in many cases generates faster code. We hope that people will try GCC 3.1, and provide us feedback about what additional features and optimizations they would like.
I know this was probably an email interview, with fixed questions, but was question 9 really relevant after he had already answered ‘no’ to question 8? He added more information, but basically said “I’ve no idea – I’ve not enough data”. I personally would have left it out…
Along the same lines, the idea of interviewing this fellah was great but it seems that he wasn’t too interested in some of the questions. Further I would have asked some very different questions because i have different focus on the matter (not better just different). It might have been neat to have given us a chance to contribute some questions.
I second the idea to ask us to contribute questions.
Perhaps you could post the questions that you thought of
and then ask for comments on them.
Too bad the answers weren’t more lengthy, but I think I
understand. Mark is probably very busy coordinating the
next release right now, so I don’t begrudge his short
answers.
Of course, this would be the perfect opportunity for
someone to gather the additional questions that I’m sure
will be appearing here shortly and go find the answers in
the gcc mailing lists and interview other developers and
then submit the report back to Eugenia. Unfortunately I
cannot volunteer myself at this point.
Thanks for posting the interview Eugenia.
Especially the auto-vectorize question should have been analyzed more. I wish Mark was a bit more forthcoming with the interview and talk a bit more.
And for the recompilation when an app is running or the incremental linking? Come on Mark, you can do better than this!
Personally, I am sticking with ICC. GCC does not seem to support all these cool features. I had some hopes for GCC 3.x, but these guys seem to have stick their heads to Aho/Selthi/Ullman’s “Compilers” book, which was state of the art in 1985. Things have changed since then, and ICC or MsVC proves this.
I’m sure the interviewer started off with good intentions as the questions suggest, but wow.. those are some pathetic responses. I feel i’d have gotten more information by asking myself those questions and answering “i don’t know”.
I must say, i’m with ICC-v6 on this one. ICC and VC are excellent compilers, and i think it should be on the GCC team’s plate to tackle these issues, or at least provide some insight on their plans to do them, or lack-of. Of course, this is what i expect from GPL projects so i wasn’t TOO let down.
We have published more than 20-25 interviews on OSNews since last August. Only two of them were in the “don’t bother me” mode. This one and the Linus Torvalds one.
Their loss. Not OSNews’.
The article is linked by every big Linux/OSS site atm (so, OSNews get lots of hits), but they could have made it to “work” better for them and their projects. These things work both ways. It works fine for us, but it won’t work very well for CodeSourcery or GCC, “marketing”/popularity-wise. We gave them a chance of presenting gcc 3.x to our readers, who are mostly devs or power users. And GCC 3.1 comes out soon. It could do better with some additional good exposure. Because the marketeers are the developers in this instance. If I was interviewing the people behind Intel’s compiler or MsVC, I would probably be directed to talk to their marketing or project manager guys. With Open Source, the developers are the “marketing” people too. It is an additonal responsibility, except if they don’t care about publicity. In which case, it is not a surprise that Linux has less than 1% of the desktop market.
Yeah, I am unhappy too with this interview. I will survive though.
No more gcc/g++ crap for me! Sun Developer subscription is in the mail
Yeah, I agree. It’s their loss. Still, I wish more of the questions were answered better… it would have be a very nice interview.
With Open Source, the developers are the “marketing” people too. It is an additonal responsibility, except if they don’t care about publicity. In which case, it is not a surprise that Linux has less than 1% of the desktop market.
Yep. Hmm, could you interview Steve Wozniak? That would be cool…
I’m definately with ruprecht on this one. The Forte compilers are great
You people are all missing the point of GCC. Whining that it doesn’t support this microoptimization, or that whiz-bang feature. GCC is still the only cross-platform, open source compiler worth speaking of. Will ICC cross-compile for exotic targets like ancient alpha procs? Does MSVC support more than a dozen operating systems?
I thought not.
that’s alll great and what not, but the fact is, that while supporting all these great platforms they have failed to make a compiler that works *WELL* on even the most popular platforms. (x86/Alpha/Sparc). And what’s with supporting crap like ada something or another. They should consentrate on writting a C/C++ compiler and not an ada/java/<some other thing that does not belong there> compiler.
BTW
Alpha is NOT and exotic CPU
(am I getting old???)
I like chess, and have observed for several years now that the same chess program code compiled by GCC for a linux system runs much slower than when compiled by MSVC on windows. I would think that it should be quite the opposite, since one can compile custom linux kernels, optimize for speed, no GUI window manager overhead, etc. but it is not so.
I would really like to see the Intel compiler people provide some assistance to GCC.
I agree the developer wasn’t as open as he should have been, but the question’s also seemed overly specific. They focused far too much on comparing GCC to other compilers and performance in general. I know performance is important, but these aren’t BeOS (they’re UNIX people) people and you’ve got to treat them a little differently Perhaps if you’d asked more questions about g++’s complience with ISO-C++ (which they seem particularly proud of) or stability or been allowed some questions with a bit possibility for open ended response, you would have gotten some more information.
PS> I don’t mean to criticize in any way. This is just my analysis of why it seems the interviewee wasn’t terribly interested in the questions.
GCC is a very good compiler. It’s open source (which prevents them from using some optimization algorithms that are propriatory, btw) widely supported, extremely well documented* very standards complient, and generates good, stable code. Sure it’s not the fastest or most optimizing, but that’s not the only thing a compiler needs. Besides, if GCC didn’t support a lot of these architectures, no one would. It’s more important to GCC to keep these supported than to get the absolute best performance from one particular proc. Different projects, different priorities. Don’t like it, use ICC!
* Don’t underestimate the importance of an open and documented compiler. I’ve been using ICC with my OS kernel, and reverse engineering compiler-dependent stuff was getting old. I finally got it all working, and then ICC 6 came out and changed the ABI. Thankfully, this time its new open C++ ABI (and the same as G++ 3.1’s) so I should only have to do this C++ support crap one more time.
On the contrary, I thought the man’s responses were great. He went straight to the points. Obviously, he is no marketing director, and doesn’t claim to be one. I thought we should first give him credit for doing the interview to begin with.
BTW, If you think GCC, or Linux, or whatever needs some marketing, how about volunteering your own effort? Its all volunteer stuff remember. This generation is way too spoiled. They whine about everything. Even if you put them in heaven, they will invent something to cry about. Basically, they think the world owes them heaven and earth, even when they are getting free services.
As for linux-desktop and advertising: Apple is well advertised, and yet it gets less than 5% of the desktop. What gives? So was OS2.
Anyway, it is always amusing to hear the latest explanation -as to why Linux on the desktop is a flop.
Yes, but the price of the Forte Suite is a kick in the shorts (you can get 2 Sun Blade Systems for the same price).
I dont understand what you people are talking about? ICC and MSVC etc etc.
GCC is *multi-platform* and *open source*, generates good, fast, stable code. Period.
Intel knows their own processor better than anybody, hence they are able to make ICC better than all other compilers for their platform. Tell them to make the *same* compiler generate binaries for sparc, alpha, mips, etc etc…
GCC, being multi-platform, is not able to generate *very* optimized code for one platform of all those it supports.
MSVC and ICC just concentrate on ONE platform and therefore they win!
GCC has helped the Open Source community a lot, since the same code (Almost) compiles on any platform, any OS, etc. And it is *free*. The whole open source evolution has been dependent on GCC.
Sure, the questions weren’t the greatest, but is it any surprise? Eugenia and the rest of the OSNews team aren’t compiler gurus. From an end-user-developer standpoint, what other kinds of questions would one ask?
GCC is awesome. But apologetics isn’t needed. It’s Free, widely supported and documented. That’s incredible. But it doesn’t mean that it can’t improve, and that the users of it cannot wish it so. No need to get defensive.
Indeed, an open and documented compiler is a wonderful thing. But that makes it all the more important that GCC have the features of modern compilers like ICC. Sure, someone could just go use ICC, but as you state, there are other problems introduced with that. So what’s wrong in wishing for GCC to be on the level with ICC?
GCC is the Gnu Compiler Collection. It aims to be portable and support a lot of targets. The questions basically reeked of “gcc produces inferior x86-code. What are you doing to fix this for us non-contributing leeches?”, which is just plain rude and whining.
The questions should have been about general improvements in code generation, if the codebase has become easier work with and add targets to, if any new targets is coming in, how much of the c++ standard it supports (is export in? g++ compiles both Loki and Boost, no? Does MSVC?). You didn’t even ask what was in store after the release? What is the focus of the next major version?
In short, the questions sucked and the answers were to the point.
One point often missed is that GCC is restricted to using non-patented optimization methods. Basically the dragon book and a bit further than that but vectorization is probably right out. I’d like Gcc to support openMP though (is there a patent issue?)
Anyway I find most high-level optimizations to be overrated. On some rare occasions you’ll find a non-trivial improvement on a carefuly written piece of code, but if you recompile any pre-existing large project with Icc instead of Gcc you’re not likely to get much more than 5-10% speed improvement if you are lucky. That’s always good to have but not worth bitching too much about it.
Anyway, there’s always pgcc (Pentium-optimized Gcc), never tried it but I hear it has OK x86 optimizations. In some sence Gcc is the reference/baseline compiler now. It never hurts to use it, it’s reasonably efficient (not perfect) and runs almost everywhere. It is also free of *any* requirements. Look at the EULA for VC++ if you want a taste of what proprietary people want you not to do with their tools for example.
Now if you need the extra performance on a particular platform you’ll need to go to another compiler, and be prepared to a lot of heartache if you find it miscompiles your code for some reason.
All the best.
Especially the auto-vectorize question should have
been nalyzed more.
It would make sense that such a pass would be implemented at some point. GCC 3.1 is the first release with (experimental) support for SIMD instructions such as SSE and AltiVec. Autovectorization has been discussed on the mailing list.
Personally, I am sticking with ICC. GCC does not seem
to support all these cool features. I had some hopes
for GCC 3.x, but these guys seem to have stick their
heads to Aho/Selthi/Ullman’s “Compilers” book, which
was state of the art in 1985. Things have changed
since then, and ICC or MsVC proves this.
MSVC also proves that complying with the standards is hardly a goal they’re persueing. ICC is a cool compiler — for Intel machines. Ever tried it on Athlon? It doesn’t produced faster code than GCC for AMD processors at all, AFAIK
As for the dragon book, GCC actually is way beyond that in some areas, but yes, it lags in some areas compared to other compilers. But GCC has been around for such a long time that stability is an issue. There are so many platforms that actually _depend_ on GCC, which means that GCC crew have a responsibility. I don’t think it’s surprising that this prevents inclusion of all kinds of fancy but hardly effective new optimizations.
Maybe the problem is that there just aren’t that many gcc developers. It’s like how everybody was bashing koffice until it became public knowledge that there were only 3 guys working on it. It’s probably something like that with gcc too. I mean, come on, would YOU go develop gcc?
I got the impression reading the interview that it was kind of a Turing test. Was the person answering the questions a program (bot) or a real person? Geez programmers heh
I feel for you Eugenia!
Code.
OK, GCC is targeted for multiple platforms and it is median on all but ICC is much faster for new Intel or AMD processors. Most of linux distributions and applications are still compiled for 386 processors…
I use icc compiler for developing scientific programs and on some of it (specially wich that use vector or matrix calculations) I can obtain 40% to 50% of gain in execution time (with all vectorization and optimization turned on and Pentium II code generation). ICC is also better than M$ Visual C++ (or C+- ? ๐ ).
I didn’t like the questions much, but that’s mostly because I rarely share Eugenia’s point of view on things.
I don’t think the questions were up Mark’s alley, and that’s a shame, and possibly OSNews should have tailored the questions better.
a) CodeSourcery aren’t really focussed on lots of x86 work, they port to other platforms etc, so a lot of x86/G4/Crusoe etc questions aren’t up their alley.
b) They (and the rest of the GCC team) tend to be big on the standardisation point of view. The C++ standard and ABI standards. So, the first question worked well.
c) Mark is the release engineer, so he would probably have been happier answering questions abou that.
However, CS does pin their company on GCC, and if they’re not willing to put effort into an interview about it, then they’re doing themselves a disfavour.
Ever if Mark had passed the questions off to someone else, it would have looked better than it did.
He doesn’t owe us anything, and nor does the GCC team, but you don’t create good geek-karma by putting minimal effort into inteviews for tech sites.
And if you target market is geeks, then you need good geek-karma.
Oh well, it looks like another bunch of engineers that aren’t interest in marketing themselves. Not too much of a surprise really.
This obviously shows that GCC could need some marketing help, but that’s IMO no reason to give it up. Neither are the lack of “advanced features”. Would you rather have a buggy compiler producing blazingly fast code, or do you like the stability of Linux? ๐ (I’m not talking about stability of XFree+dog….)
Of course, anyone could start a new GNU project writing the world’s best compiler for x86 architectures. Then you could write it in C++, using G++/libstdc++v3 for speedy development (generic programming etc). Maybe that would be a nice project to get a high-performance compiler on Intel, but then Intel have already provided such a compiler.
Too bad we can’t get everything for free..
can you blame the guy?
he is bombarded with requests for journalists to the point that he has a standing rule that no journalist can enter his house and he has a handler at work so that he can actualy get work done.
I mean, sheesh, how many times do you think you could be asked the same set of questions by hundreds of people every year?
Journalists are so dang serious, and Linus just wants to have fun.
let the guy have a life and don’t bemoan him for not being enthusiastic about “Another” interview with the same set of questions. I am sure if he was asked questions on a more personal level like “what are you doing with your days now” and “hows the family life” or “what do you see yourself doing when you are an old swdish speaking finn”
ask him questions that are actualy interesting to him, and anyone else who gets bombarded with interview requests for that matter, and he will probobly be more enthusiastic and detailed about his answers.
Mark is the release engineer. He can talk about the
release process and give his personal opinions about GCC technlogy and direction. If you want a complete answer about GCC development and directions, you need to ask all of the major developers.
I have to (second, third, fourth?) just about everyone’s opinion here: uninteresting interview with an unenthusiastic person. Surely the project has a better evangelist, and prompting users for questions (ala /.) would be much better….
I think icc is a great thing. Having never used gcc on an x86 machine I have often resented the amount of effort that goes into optomizing for that architecture. Maybe now x86 performance will not be as big a deal.
Having read the interview, and the comments, I realize that autovectorization is not too likely in the immediate future, but i think that should be the highest priority.
Intel, AMD, Apple, and others sell computers with proprietary vector units, and there are few good compilers that will do autovectorization. People will take advantage of vector units, and if they are forced to do it by hand (as i will soon do), that damages compatability worse than any lack of standards ever could.
Apple may well be our best chance here. Apple has more riding on gcc than any other company, and has been contributing back. Apple also has alot riding on AltiVec, so I can hope they are doing work on autovectorization that will find its way back into gcc trunk, and eventualy become generalized to work cross platform.
Some people may be interested in this series of benchmarks.
http://www.coyotegulch.com/reviews/intel_comp/intel_gcc_bench2.html
I’m kinda surprised to see the Infineon 166 microcontrollers mentioned. I’m working on learning them for work. I wouldn’t think to use gcc for embedded controllers. I suppose that cross compiling is one of gcc strong points though.
Anyhow, it’s good to hear about gcc development going strong. Alternative OS’s benefit HUGE by this work.