LWN: Comments on "pcc seeks contributions to reach 1.0 milestone" https://lwn.net/Articles/307437/ This is a special feed containing comments posted to the individual LWN article titled "pcc seeks contributions to reach 1.0 milestone". en-us Sat, 27 Sep 2025 23:55:47 +0000 Sat, 27 Sep 2025 23:55:47 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net pcc seeks contributions to reach 1.0 milestone https://lwn.net/Articles/309814/ https://lwn.net/Articles/309814/ nix <div class="FormattedComment"> Oh yes, agreed. I was being pedantic in another area, that it makes no <br> sense to say that you use SSA *as* your IR, because it's not an IR, just a <br> set of rules that constrain that IR (it's applicable to many different <br> sorts of IR, but *you* know that.)<br> </div> Fri, 05 Dec 2008 00:44:44 +0000 pcc seeks contributions to reach 1.0 milestone https://lwn.net/Articles/309699/ https://lwn.net/Articles/309699/ salimma <div class="FormattedComment"> LLVM IR is almost entirely in SSA form -- it still has pointers, but apart from that, assignments must be to fresh "registers"<br> </div> Thu, 04 Dec 2008 17:15:53 +0000 pcc seeks contributions to reach 1.0 milestone https://lwn.net/Articles/308074/ https://lwn.net/Articles/308074/ nix <div class="FormattedComment"> I only just learned of libfirm from this thread, and it looks *deeply* <br> cool. I can think of half a dozen potential uses for it already :)<br> <p> </div> Thu, 20 Nov 2008 22:36:10 +0000 pcc seeks contributions to reach 1.0 milestone https://lwn.net/Articles/308000/ https://lwn.net/Articles/308000/ bboissin <div class="FormattedComment"> "you'd need to go through another one immediately before conversion to assembler or your output would be ludicrously inefficient"<br> <p> Coalescing is done during the Out-of-SSA pass (and it would be very inneficient to do the Out-of-SSA by replacing each phi with a move), if you're in CSSA form, just replace every phi-related variable with a unique variable and that's all (so the hard part is the conversion to CSSA).<br> <p> As for the IR, I believe SSA can really influence your IR, so it's not just a property (you need parallel moves, etc). Libfirm does that very nicely from what I've seen.<br> </div> Thu, 20 Nov 2008 16:49:14 +0000 BSD Dissatisfied with gcc... why? https://lwn.net/Articles/307952/ https://lwn.net/Articles/307952/ etienne_lorrain@yahoo.fr <div class="FormattedComment"> <font class="QuotedText">&gt; &gt; the basic use of volatile (register mapped) integers</font><br> <font class="QuotedText">&gt; Wrong. I think you were thinking of the "register" keyword.</font><br> <p> No, I was and am still talking of "volatile".<br> The problem is that the C++ standard treats all attributes the same way, and gives examples with "const".<br> I do understand that to overwrite the "const" attribute, I need to do a dirty cast to non-const, but the basic use of volatile is to copy them into standard variables, at a controled place of the software:<br> <p> volatile unsigned ethernet_status;<br> /* -&gt; address of ethernet_status defined in the linker file */<br> int fct(void) {<br> unsigned status = ethernet_status; // single read of "ethernet_status"<br> return ((status &amp; 1) || ((status &amp; 2) ^ (status &amp; 4)));<br> }<br> <p> Now tell me how to put ethernet_status and fct() into a class and compile without warning and without casting ethernet_status to non-volatile...<br> <p> But the worst for me is still considering a volatile structure of bitfields as a structure of volatile bitfields, even if I see no problem to consider a constant structure of bitfields as a structure of constant bitfields...<br> For instance:<br> volatile struct color_s { char red, green, blue, transparent; } volcolor;<br> int fct (void) {<br> struct color_s color = volcolor;<br> return color.red == color.blue;<br> }<br> Because volcolor is considered as a structure of volatile fields, volcolor is read twice (two byte access) when optimising.<br> </div> Thu, 20 Nov 2008 10:34:34 +0000 pcc seeks contributions to reach 1.0 milestone https://lwn.net/Articles/307933/ https://lwn.net/Articles/307933/ nix <div class="FormattedComment"> I'm fairly sure 'having SSA as your primary IR' makes no real sense: it's <br> like saying 'having assignment as your primary IR'. Having your primary <br> IR, *whatever it is*, be in SSA form for as much of the time as possible <br> is probably a very good thing (although I'm not sure how you could convert <br> *directly* to it: you'd need to go through a non-SSA form immediately <br> after parsing, and you'd need to go through another one immediately before <br> conversion to assembler or your output would be ludicrously inefficient).<br> <p> </div> Thu, 20 Nov 2008 07:51:42 +0000 pcc seeks contributions to reach 1.0 milestone https://lwn.net/Articles/307911/ https://lwn.net/Articles/307911/ bboissin <div class="FormattedComment"> You should really consider having SSA as your primary IR. It makes so many things trivial... I especially like the IR used by libfirm (<a href="http://www.info.uni-karlsruhe.de/software/libfirm/index.php?title=Main_Page">http://www.info.uni-karlsruhe.de/software/libfirm/index.p...</a> ). It gives you many things for free (SSA all along, no dead code, etc.)<br> </div> Thu, 20 Nov 2008 00:16:34 +0000 BSD Dissatisfied with gcc... why? https://lwn.net/Articles/307864/ https://lwn.net/Articles/307864/ nix <div class="FormattedComment"> In particular, 'volatile' is still useful. 'register' is, basically, not, <br> with the single rare exception of global register variables (a GCC <br> extension).<br> </div> Wed, 19 Nov 2008 20:57:39 +0000 pcc seeks contributions to reach 1.0 milestone https://lwn.net/Articles/307861/ https://lwn.net/Articles/307861/ nix <div class="FormattedComment"> Just... just... just forget everything I've posted for the last week. <br> Nearly all of it seems to be wrong. Posting when ill or when sickening up <br> for something seems to turn me into a babbling idiot incapable of adding <br> two and two without getting NaN.<br> <p> </div> Wed, 19 Nov 2008 20:46:04 +0000 BSD Dissatisfied with gcc... why? https://lwn.net/Articles/307776/ https://lwn.net/Articles/307776/ dgm <div class="FormattedComment"> <font class="QuotedText">&gt; the basic use of volatile (register mapped) integers</font><br> <p> Wrong. I think you were thinking of the "register" keyword. <br> "Volatile" means that the contents of a variable can be changed externally at any time. Think, for instance, of a memory mapped hardware register. Basically it instructs the compiler to avoid certain optimizations based on knowledge of the previous value, and forces it to read it every time.<br> </div> Wed, 19 Nov 2008 14:36:36 +0000 pcc seeks contributions to reach 1.0 milestone https://lwn.net/Articles/307767/ https://lwn.net/Articles/307767/ ragge <div class="FormattedComment"> And that opinion is based on... on what?<br> <p> </div> Wed, 19 Nov 2008 11:10:10 +0000 pcc seeks contributions to reach 1.0 milestone https://lwn.net/Articles/307759/ https://lwn.net/Articles/307759/ nix <div class="FormattedComment"> I think I must be getting it from the wrong place. Never. Do. Research. <br> While. Ill. *slaps self*<br> <p> </div> Wed, 19 Nov 2008 08:36:51 +0000 pcc has been making good progress https://lwn.net/Articles/307758/ https://lwn.net/Articles/307758/ ragge <div class="FormattedComment"> Well, there were some maybe not so good design decisions in the compiler, but those that matters has been corrected. Hey, it's a small compiler, not so difficult to fix things :-)<br> </div> Wed, 19 Nov 2008 08:36:36 +0000 pcc seeks contributions to reach 1.0 milestone https://lwn.net/Articles/307754/ https://lwn.net/Articles/307754/ ragge <div class="FormattedComment"> Hm, which compiler did you look at? :-) The SSA conversion code has been into pcc for years, I just haven't finished it up, it has not been my main priority.<br> <p> If you have a compiler with a reasonable internal design, none of the standard optimizing algorithms are especially difficult to add (like SSA conversion, graph-coloring register allocator, strength reduction etc.) <br> </div> Wed, 19 Nov 2008 07:34:28 +0000 Good link https://lwn.net/Articles/307753/ https://lwn.net/Articles/307753/ ragge <div class="FormattedComment"> Please look at the presentation again. The things you mentions are already put in the compiler. The initial design of the compiler made it very easy to add state-of-the-art optimizing stuff. I think especially the multi-class register allocator is one of the best available today.<br> <p> Currently the code generated is between 0-10% slower than code generated by gcc, and most of the time "lost" is due to not-yet added optimizations. Still, the compiler runs around 15 times faster than gcc.<br> </div> Wed, 19 Nov 2008 07:28:12 +0000 Nice example... https://lwn.net/Articles/307681/ https://lwn.net/Articles/307681/ dlang <div class="FormattedComment"> multi-threaded programming will be in much better shape (standards wise) in a couple years.<br> <p> defining this area is one of the bigger changes in the new POSIX, C, and C++ standards that are nearing completion (POSIX is complete, C is expected next year, C++ sometime after that)<br> </div> Tue, 18 Nov 2008 19:07:22 +0000 Nice example... https://lwn.net/Articles/307647/ https://lwn.net/Articles/307647/ jzbiciak <div class="FormattedComment"> I don't come down on the side of "GCC == BAD" at all. What I was pointing out, though, is that the C standard and its wiggle room are at odds with things like kernels and multithreaded programs. If you can only rely on what the C standard guarantees, then it's much harder to do useful things efficiently.<br> <p> More aggressive optimizations will rely on this wiggle room and sometimes break things. That's a headache for kernel developers. Sure, GCC may get fixed, but breaking to begin with was an annoyance. If the break causes subtle problems, diagnosing the issue could be very difficult. <br> <p> This is where a simpler compiler can be more effective. If it provides very simple semantics (rather than the extraordinary wiggle room the standard provides), it becomes easier to reason about the correctness of the program. Yes, it's less portable to other compilers, but as long as the compiler itself is portable, what's the issue?<br> <p> After all, you don't see many Linux builds that don't use GCC (although there are a few...).<br> </div> Tue, 18 Nov 2008 17:38:59 +0000 Nice example... https://lwn.net/Articles/307643/ https://lwn.net/Articles/307643/ daney <div class="FormattedComment"> That is an excellent example, one that clearly shows that the GCC developers being responsive by carefully analysing the situation and changing their compiler to address the concerns raised by the Linux kernel developers.<br> <p> There was some initial contention, but once the situation was well understood, the desired results were obtained. There are some who argue based on the axiom that GCC == BAD, but I don't think it holds in the case you mention.<br> </div> Tue, 18 Nov 2008 17:24:01 +0000 Good link https://lwn.net/Articles/307631/ https://lwn.net/Articles/307631/ nix <div class="FormattedComment"> The *very* early C compilers are even more stunningly simple, and they <br> probably work quite well for PDP10s, and are good examples even now of <br> simple parsers.<br> <p> But if you want to get decent performance on modern hardware you *need* <br> things like speculative code motion (to avoid pipeline stalls), and if you <br> want that then you need dataflow analysis and I can see no way they can do <br> that with PCC without turning it into something quite different.<br> <p> So perhaps they plan for this to stay forever in the ghetto of 1980s and <br> pre-1980s hardware? I'm not sure, but it hardly seems like an exciting <br> growth area to me.<br> <p> </div> Tue, 18 Nov 2008 16:03:59 +0000 pcc seeks contributions to reach 1.0 milestone https://lwn.net/Articles/307629/ https://lwn.net/Articles/307629/ nix <div class="FormattedComment"> Good grief. I had no idea pcc was *that* primitive. They will hit a wall <br> as hard as carborundum as soon as they try to do decent optimizations. <br> (Why? Look at the IR. Try to figure out how to rewrite the thing into SSA <br> form without significant agony. I gave up. And without SSA, you lose, oh, <br> pretty much all high-level optimizations described in the literature. It's <br> one reason why GCC was held back for so long... and now another compiler <br> is blithely heading off down the same wrong track. *sigh*)<br> <p> </div> Tue, 18 Nov 2008 16:00:06 +0000 BSD Dissatisfied with gcc... why? https://lwn.net/Articles/307624/ https://lwn.net/Articles/307624/ nix <div class="FormattedComment"> OK, right, my memory is flawed and I shouldn't post while high on <br> gamma-globulins.<br> </div> Tue, 18 Nov 2008 15:10:19 +0000 BSD Dissatisfied with gcc... why? https://lwn.net/Articles/307609/ https://lwn.net/Articles/307609/ etienne_lorrain@yahoo.fr <div class="FormattedComment"> <font class="QuotedText">&gt; Not following standards is a very slippery path.</font><br> <p> Even when the standards are very unclear, like volatile structure of bitfields considered by GCC (in C) as structure of volatile bitfields, resulting in reads of volatiles on an "C" whole structure write?<br> Moreover, I still do not understand how in C++ I am supposed to use volatile integers - when I want to write a non volatile integer to it or read it into a non volatile integer - i.e. the basic use of volatile (register mapped) integers. Obviously I do not want warnings or a cast of my volatile register mapped integer into non volatile...<br> </div> Tue, 18 Nov 2008 10:42:45 +0000 BSD Dissatisfied with gcc... why? https://lwn.net/Articles/307601/ https://lwn.net/Articles/307601/ dgm <div class="FormattedComment"> To disprove yourself, simply try LCC or other simple compiler, and watch the code run 2 or 3 times slower than the one generated by GCC (that is in turn two times slower than the one generated by other compilers).<br> <p> The real problem with GCC is that it's overly complex (and slow) for the quality of optimizations it provides.<br> </div> Tue, 18 Nov 2008 08:18:20 +0000 Good link https://lwn.net/Articles/307599/ https://lwn.net/Articles/307599/ roskegg <div class="FormattedComment"> Ragge's presentation that you linked to was really nifty. I didn't realize a C compiler could be so simple.<br> <p> I hope he finishes pdp10 support at some point, and that NetBSD and OpenBSD get ported to the PDP10. It would be a fun honeypot to leave running.<br> </div> Tue, 18 Nov 2008 07:59:43 +0000 pcc seeks contributions to reach 1.0 milestone https://lwn.net/Articles/307584/ https://lwn.net/Articles/307584/ RandyBolton <div class="FormattedComment"> I found this recent presentation from Anders Magnusson on the web that gives a good overview of the current state of PCC:<br> <p> Bringing PCC into The 21th century<br> by Anders Magnusson<br> October 11, 2008<br> <a href="http://www.nycbsdcon.org/2008/files/magnusson_pcc.pdf">http://www.nycbsdcon.org/2008/files/magnusson_pcc.pdf</a><br> <p> </div> Tue, 18 Nov 2008 03:55:49 +0000 BSD Dissatisfied with gcc... why? https://lwn.net/Articles/307576/ https://lwn.net/Articles/307576/ jzbiciak <P>Granted, since I follow Linux much, much more closely than BSD, I tend to hear it from the Linux kernel guys. <A HREF="http://kerneltrap.org/Linux/Compiler_Misoptimizations">Here's a thread that captures what I'm talking about.</A></P> Tue, 18 Nov 2008 01:49:54 +0000 pcc has been making good progress https://lwn.net/Articles/307571/ https://lwn.net/Articles/307571/ robert_s <div class="FormattedComment"> "Someone here said pcc suffers from ancient bad design decisions. What would those be? The codebase is almost entirely new, very little of the original code remains."<br> <p> Exactly - so they're essentially scratchwriting a compiler, it's just everyone's afraid of saying that for some reason. Perhaps because it betrays the mammoth nature of the task.<br> </div> Tue, 18 Nov 2008 00:53:02 +0000 Relying on Caldera? https://lwn.net/Articles/307570/ https://lwn.net/Articles/307570/ JoeBuck Oh, please. The press releases from Caldera announcing the source code release are on the record, and you can find them on the web. There was never any restriction on commercial use. <p> <a href="http://www.tuhs.org/Archive/Caldera-license.pdf">Here's a copy of the announcement</a>, which for some odd reason you'll no longer find on SCO's site. <p> Given subsequent events, perhaps SCO can argue that their predecessor company had no right to do this, because Novell, not they, own Unix. But to say so would undercut their own argument in their legal troubles with Novell. Tue, 18 Nov 2008 00:50:40 +0000 BSD Dissatisfied with gcc... why? https://lwn.net/Articles/307568/ https://lwn.net/Articles/307568/ qg6te2 <i>it seems like nearly every major GCC release seems to break something subtly somewhere that was relying on a stronger guarantee than is offered by the standard.</i> <p> "Stronger guarantee than offered by the standard"? I don't think such a thing exists. Not following standards is a very slippery path. If one writes code that does not follow the standard but rather some bastardised version of it, the resulting code is by default non-portable and likely to break across compilers (even on the same architecture). I've seen non-portable trickery where the entire point was to get a 5% speedup on a particular version of a compiler. Tue, 18 Nov 2008 00:42:13 +0000 BSD Dissatisfied with gcc... why? https://lwn.net/Articles/307563/ https://lwn.net/Articles/307563/ dlang <div class="FormattedComment"> the fact that chips have been getting _much_ smarter and changing their internal architecture has meant that a lot of the optimizations that GCC tries so hard to do are not as useful as they used to be (and in some cases activly bad for current hardware).<br> <p> this makes a simple compiler very attractive (at least in theory)<br> </div> Tue, 18 Nov 2008 00:33:45 +0000 BSD Dissatisfied with gcc... why? https://lwn.net/Articles/307566/ https://lwn.net/Articles/307566/ EmbeddedLinuxGuy <em>the stated reason for pcc's being revived in the first place rather than working on something non-stoneage was a fear of the GPL / desire to have absolutely nothing GPLed in their entire distro.</em> <br><br> What I have read from the BSD leadership explicitly denies this. See the interview in the Jem Report where Theo de Raadt says that replacing GPL-licensed code has <a rel="nofollow" href="http://www.thejemreport.com/content/view/369/">"never really been the agenda"</a>. I don't deny that there may be BSD folks who would prefer an all-BSD-licensed distribution, but I have not seen this stated as a reason for anything. <br><br> Theo's point is that we should not be dependent on a software monoculture; which is the same reason we benefit from both KDE and GNOME, Linux and BSD, Firefox and Webkit, etc etc. I see nothing "anti-GPL" here. Tue, 18 Nov 2008 00:33:44 +0000 pcc seeks contributions to reach 1.0 milestone https://lwn.net/Articles/307562/ https://lwn.net/Articles/307562/ jzbiciak <div class="FormattedComment"> Well, its license is very BSD-like. It's certainly not GPL.<br> </div> Mon, 17 Nov 2008 23:55:59 +0000 BSD Dissatisfied with gcc... why? https://lwn.net/Articles/307560/ https://lwn.net/Articles/307560/ jzbiciak <div class="FormattedComment"> If GCC's GPL license were the driving issue, then why not contribute to LLVM's Clang and get a thoroughly modern compiler with a very BSD-like license? PCC dates to the 70s and GCC to the 80s. <br> <p> LLVM's license reads an awful lot like the BSD-with-advertising-clause, just with UIUC's name subbed in.<br> <p> <a href="http://llvm.org/releases/2.3/LICENSE.TXT">http://llvm.org/releases/2.3/LICENSE.TXT</a><br> <p> I suspect it's not just license.<br> <p> I seem to recall a big part of the attractiveness of PCC was that it was very simple and fast. Advanced transformations and optimizations have greater likelihood of breaking a complex program. Aggressive optimizations push the semantics of the C language quite a bit, such that it's hard to write something like a kernel. Lately, it seems like nearly every major GCC release seems to break something subtly somewhere that was relying on a stronger guarantee than is offered by the standard.<br> </div> Mon, 17 Nov 2008 23:55:05 +0000 BSD Dissatisfied with gcc... why? https://lwn.net/Articles/307550/ https://lwn.net/Articles/307550/ nix <div class="FormattedComment"> They're not incompatible, but the stated reason for pcc's being revived in <br> the first place rather than working on something non-stoneage was a fear <br> of the GPL / desire to have absolutely nothing GPLed in their entire <br> distro.<br> <p> I consider this utter lunacy, but if they want to waste their time to that <br> extent, well, it's their time to waste.<br> </div> Mon, 17 Nov 2008 22:54:56 +0000 BSD Dissatisfied with gcc... why? https://lwn.net/Articles/307548/ https://lwn.net/Articles/307548/ DonDiego <div class="FormattedComment"> It's not just BSD folks. gcc gets slower with every release, the code is generates is often of poor quality and bug reports are sometimes brushed aside and ignored.<br> </div> Mon, 17 Nov 2008 22:29:35 +0000 BSD Dissatisfied with gcc... why? https://lwn.net/Articles/307545/ https://lwn.net/Articles/307545/ EmbeddedLinuxGuy <em>Thanks for reminding me of the licensing incompatibility</em> <br><br> If you are implying that GPL and BSD licenses are incompatible, this is not accurate. Of course they are compatible; how do you think the project has gotten by so far? Mon, 17 Nov 2008 22:14:37 +0000 pcc seeks contributions to reach 1.0 milestone https://lwn.net/Articles/307546/ https://lwn.net/Articles/307546/ nix <div class="FormattedComment"> But LLVM has the Wrong License, sigh.<br> </div> Mon, 17 Nov 2008 22:12:23 +0000 pcc has been making good progress https://lwn.net/Articles/307540/ https://lwn.net/Articles/307540/ roskegg <div class="FormattedComment"> I've been watching the commits to the pcc tree, and am really impressed at the progress it is making. It really is fitting the bill of small, clean, fast, portable. Just recently support for inline functions was added.<br> <p> The pcc project is small enough that a regular guy can wrap his head around it, whereas gcc takes a lot of effort.<br> <p> Ragge deserves our support, and we can only benefit from pcc become better. It is already usable.<br> <p> Someone here said pcc suffers from ancient bad design decisions. What would those be? The codebase is almost entirely new, very little of the original code remains.<br> </div> Mon, 17 Nov 2008 21:57:45 +0000 Relying on Caldera? https://lwn.net/Articles/307531/ https://lwn.net/Articles/307531/ dmarti After Caldera became SCO, the company denied that it ever released "ancient Unix" for anything but "non-commercial use." Does anyone have a clear committment from Novell or any of the other Unix copyright holders to release this? Or are people relying on the 2002 letter from Bill Broderick? Mon, 17 Nov 2008 21:06:24 +0000 pcc seeks contributions to reach 1.0 milestone https://lwn.net/Articles/307514/ https://lwn.net/Articles/307514/ robert_s <div class="FormattedComment"> Total waste of time (and now money). Time would be better spent working on Clang for LLVM. The only thing they can possibly inherit from pcc is poor design decisions.<br> </div> Mon, 17 Nov 2008 20:03:45 +0000