pcc seeks contributions to reach 1.0 milestone
Posted Nov 17, 2008 17:25 UTC (Mon)
by pr1268 (guest, #24648)
[Link] (21 responses)
Just curious, what exactly is BSD's dissatisfaction with GCC? I'm not saying that the compiler world begins and ends with GCC, but it certainly commands higher respect and market share amongst the non-Microsoft and Sun/Solaris computing communities (but I've used GCC with success on these platforms as well). Is this just more BSD v. GNU/Linux politics (SSH comes to mind here)?
Posted Nov 17, 2008 17:29 UTC (Mon)
by rsidd (subscriber, #2582)
[Link] (18 responses)
Posted Nov 17, 2008 17:48 UTC (Mon)
by pr1268 (guest, #24648)
[Link] (17 responses)
My thoughts on SSH (and my comment above) were influenced by some flame wars I read about (the Broadcom BSD driver row in particular). I probably should have specified OpenSSH. However, I really don't mean to dredge up reminders of how BSD v. GNU/Linux politics can get ugly. Thanks for reminding me of the licensing incompatibility--that puts things in a better perspective.
Posted Nov 17, 2008 18:55 UTC (Mon)
by mheily (subscriber, #27123)
[Link]
Posted Nov 17, 2008 22:14 UTC (Mon)
by EmbeddedLinuxGuy (guest, #35019)
[Link] (15 responses)
Posted Nov 17, 2008 22:54 UTC (Mon)
by nix (subscriber, #2304)
[Link] (14 responses)
I consider this utter lunacy, but if they want to waste their time to that
Posted Nov 17, 2008 23:55 UTC (Mon)
by jzbiciak (guest, #5246)
[Link] (11 responses)
LLVM's license reads an awful lot like the BSD-with-advertising-clause, just with UIUC's name subbed in.
http://llvm.org/releases/2.3/LICENSE.TXT
I suspect it's not just license.
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.
Posted Nov 18, 2008 0:33 UTC (Tue)
by dlang (guest, #313)
[Link] (1 responses)
this makes a simple compiler very attractive (at least in theory)
Posted Nov 18, 2008 8:18 UTC (Tue)
by dgm (subscriber, #49227)
[Link]
The real problem with GCC is that it's overly complex (and slow) for the quality of optimizations it provides.
Posted Nov 18, 2008 0:42 UTC (Tue)
by qg6te2 (guest, #52587)
[Link] (8 responses)
"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.
Posted Nov 18, 2008 1:49 UTC (Tue)
by jzbiciak (guest, #5246)
[Link] (3 responses)
Granted, since I follow Linux much, much more closely than BSD, I tend to hear it from the Linux kernel guys. Here's a thread that captures what I'm talking about.
Posted Nov 18, 2008 17:24 UTC (Tue)
by daney (guest, #24551)
[Link] (2 responses)
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.
Posted Nov 18, 2008 17:38 UTC (Tue)
by jzbiciak (guest, #5246)
[Link] (1 responses)
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.
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?
After all, you don't see many Linux builds that don't use GCC (although there are a few...).
Posted Nov 18, 2008 19:07 UTC (Tue)
by dlang (guest, #313)
[Link]
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)
Posted Nov 18, 2008 10:42 UTC (Tue)
by etienne_lorrain@yahoo.fr (guest, #38022)
[Link] (3 responses)
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?
Posted Nov 19, 2008 14:36 UTC (Wed)
by dgm (subscriber, #49227)
[Link] (2 responses)
Wrong. I think you were thinking of the "register" keyword.
Posted Nov 19, 2008 20:57 UTC (Wed)
by nix (subscriber, #2304)
[Link]
Posted Nov 20, 2008 10:34 UTC (Thu)
by etienne_lorrain@yahoo.fr (guest, #38022)
[Link]
No, I was and am still talking of "volatile".
volatile unsigned ethernet_status;
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...
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...
Posted Nov 18, 2008 0:33 UTC (Tue)
by EmbeddedLinuxGuy (guest, #35019)
[Link] (1 responses)
Posted Nov 18, 2008 15:10 UTC (Tue)
by nix (subscriber, #2304)
[Link]
Posted Nov 17, 2008 18:20 UTC (Mon)
by endecotp (guest, #36428)
[Link]
follow the link the the last LWN story.
Posted Nov 17, 2008 22:29 UTC (Mon)
by DonDiego (guest, #24141)
[Link]
Posted Nov 17, 2008 20:03 UTC (Mon)
by robert_s (subscriber, #42402)
[Link] (4 responses)
Posted Nov 17, 2008 22:12 UTC (Mon)
by nix (subscriber, #2304)
[Link] (2 responses)
Posted Nov 17, 2008 23:55 UTC (Mon)
by jzbiciak (guest, #5246)
[Link] (1 responses)
Posted Nov 19, 2008 20:46 UTC (Wed)
by nix (subscriber, #2304)
[Link]
Posted Nov 19, 2008 11:10 UTC (Wed)
by ragge (guest, #55254)
[Link]
Posted Nov 17, 2008 21:06 UTC (Mon)
by dmarti (subscriber, #11625)
[Link] (1 responses)
Posted Nov 18, 2008 0:50 UTC (Tue)
by JoeBuck (subscriber, #2330)
[Link]
Here's a copy of the announcement, which for some odd reason you'll no longer find on SCO's site.
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.
Posted Nov 17, 2008 21:57 UTC (Mon)
by roskegg (subscriber, #105)
[Link] (2 responses)
The pcc project is small enough that a regular guy can wrap his head around it, whereas gcc takes a lot of effort.
Ragge deserves our support, and we can only benefit from pcc become better. It is already usable.
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.
Posted Nov 18, 2008 0:53 UTC (Tue)
by robert_s (subscriber, #42402)
[Link] (1 responses)
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.
Posted Nov 19, 2008 8:36 UTC (Wed)
by ragge (guest, #55254)
[Link]
Posted Nov 18, 2008 3:55 UTC (Tue)
by RandyBolton (guest, #6186)
[Link] (12 responses)
Bringing PCC into The 21th century
Posted Nov 18, 2008 7:59 UTC (Tue)
by roskegg (subscriber, #105)
[Link] (2 responses)
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.
Posted Nov 18, 2008 16:03 UTC (Tue)
by nix (subscriber, #2304)
[Link] (1 responses)
But if you want to get decent performance on modern hardware you *need*
So perhaps they plan for this to stay forever in the ghetto of 1980s and
Posted Nov 19, 2008 7:28 UTC (Wed)
by ragge (guest, #55254)
[Link]
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.
Posted Nov 18, 2008 16:00 UTC (Tue)
by nix (subscriber, #2304)
[Link] (8 responses)
Posted Nov 19, 2008 7:34 UTC (Wed)
by ragge (guest, #55254)
[Link] (7 responses)
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.)
Posted Nov 19, 2008 8:36 UTC (Wed)
by nix (subscriber, #2304)
[Link]
Posted Nov 20, 2008 0:16 UTC (Thu)
by bboissin (subscriber, #29506)
[Link] (5 responses)
Posted Nov 20, 2008 7:51 UTC (Thu)
by nix (subscriber, #2304)
[Link] (4 responses)
Posted Nov 20, 2008 16:49 UTC (Thu)
by bboissin (subscriber, #29506)
[Link] (1 responses)
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).
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.
Posted Nov 20, 2008 22:36 UTC (Thu)
by nix (subscriber, #2304)
[Link]
Posted Dec 4, 2008 17:15 UTC (Thu)
by salimma (subscriber, #34460)
[Link] (1 responses)
Posted Dec 5, 2008 0:44 UTC (Fri)
by nix (subscriber, #2304)
[Link]
BSD Dissatisfied with gcc... why?
BSD Dissatisfied with gcc... why?
BSD Dissatisfied with gcc... why?
The previous LWN article on pcc cited in the summary explains why there is interest in an alternative to GCC. Licensing isn't the main issue. The BSDs are interested in a fast, stable, simple, reliable, and portable C compiler. If PCC can be improved to make it production-ready, it would serve their needs better than GCC does today.
BSD Dissatisfied with gcc... why?
Thanks for reminding me of the licensing incompatibility
BSD Dissatisfied with gcc... why?
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?
BSD Dissatisfied with gcc... why?
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.
extent, well, it's their time to waste.
BSD Dissatisfied with gcc... why?
BSD Dissatisfied with gcc... why?
BSD Dissatisfied with gcc... why?
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.
BSD Dissatisfied with gcc... why?
BSD Dissatisfied with gcc... why?
Nice example...
Nice example...
Nice example...
BSD Dissatisfied with gcc... why?
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...
BSD Dissatisfied with gcc... why?
"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.
BSD Dissatisfied with gcc... why?
with the single rare exception of global register variables (a GCC
extension).
BSD Dissatisfied with gcc... why?
> Wrong. I think you were thinking of the "register" keyword.
The problem is that the C++ standard treats all attributes the same way, and gives examples with "const".
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:
/* -> address of ethernet_status defined in the linker file */
int fct(void) {
unsigned status = ethernet_status; // single read of "ethernet_status"
return ((status & 1) || ((status & 2) ^ (status & 4)));
}
For instance:
volatile struct color_s { char red, green, blue, transparent; } volcolor;
int fct (void) {
struct color_s color = volcolor;
return color.red == color.blue;
}
Because volcolor is considered as a structure of volatile fields, volcolor is read twice (two byte access) when optimising.
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.
BSD Dissatisfied with gcc... why?
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 "never really been the agenda". 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.
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.
BSD Dissatisfied with gcc... why?
gamma-globulins.
BSD Dissatisfied with gcc... why?
BSD Dissatisfied with gcc... why?
pcc seeks contributions to reach 1.0 milestone
pcc seeks contributions to reach 1.0 milestone
pcc seeks contributions to reach 1.0 milestone
pcc seeks contributions to reach 1.0 milestone
Nearly all of it seems to be wrong. Posting when ill or when sickening up
for something seems to turn me into a babbling idiot incapable of adding
two and two without getting NaN.
pcc seeks contributions to reach 1.0 milestone
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?
Relying on Caldera?
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.
Relying on Caldera?
pcc has been making good progress
pcc has been making good progress
pcc has been making good progress
pcc seeks contributions to reach 1.0 milestone
by Anders Magnusson
October 11, 2008
http://www.nycbsdcon.org/2008/files/magnusson_pcc.pdf
Good link
Good link
probably work quite well for PDP10s, and are good examples even now of
simple parsers.
things like speculative code motion (to avoid pipeline stalls), and if you
want that then you need dataflow analysis and I can see no way they can do
that with PCC without turning it into something quite different.
pre-1980s hardware? I'm not sure, but it hardly seems like an exciting
growth area to me.
Good link
pcc seeks contributions to reach 1.0 milestone
as hard as carborundum as soon as they try to do decent optimizations.
(Why? Look at the IR. Try to figure out how to rewrite the thing into SSA
form without significant agony. I gave up. And without SSA, you lose, oh,
pretty much all high-level optimizations described in the literature. It's
one reason why GCC was held back for so long... and now another compiler
is blithely heading off down the same wrong track. *sigh*)
pcc seeks contributions to reach 1.0 milestone
pcc seeks contributions to reach 1.0 milestone
While. Ill. *slaps self*
pcc seeks contributions to reach 1.0 milestone
pcc seeks contributions to reach 1.0 milestone
like saying 'having assignment as your primary IR'. Having your primary
IR, *whatever it is*, be in SSA form for as much of the time as possible
is probably a very good thing (although I'm not sure how you could convert
*directly* to it: you'd need to go through a non-SSA form immediately
after parsing, and you'd need to go through another one immediately before
conversion to assembler or your output would be ludicrously inefficient).
pcc seeks contributions to reach 1.0 milestone
pcc seeks contributions to reach 1.0 milestone
cool. I can think of half a dozen potential uses for it already :)
pcc seeks contributions to reach 1.0 milestone
pcc seeks contributions to reach 1.0 milestone
sense to say that you use SSA *as* your IR, because it's not an IR, just a
set of rules that constrain that IR (it's applicable to many different
sorts of IR, but *you* know that.)