Live data from Hacker News

54-line if condition in gcc's reload.c

github.com

91–95 of 95 posts

Re: 54-line if condition in gcc's reload.c

#91

#ifdef should be shot

There is no other mechanism to choose between and

Plan 9 manages to build the whole OS and userland for multiple architectures without using ifdefs, even cross compiling across CPUs with different endianness

Re: 54-line if condition in gcc's reload.c

#92
post #27

Earlier quoted context omitted.

I'm impressed that the blame log has survived intact. What SCM was originally used?

When I started working on gcc 1.36 (company I was working for was designing Unix workstations and we were fixing the backend for MC680x0) we used RCS. But I'm not sure it was the original SCM, we didn't even have Internet access then :-) And we got gcc 1.35-36-37 "smuggled" to us on the 1/4" tape.

I was a MC680x0 maintainer back in those days. Also picked up i860 for the gcc 2.x stream. Fortunately I was at UMich in the gcc 1.x time, and we had NSFnet.

And yes, I used RCS when working on the gcc source.

Re: 54-line if condition in gcc's reload.c

#93
post #27

Earlier quoted context omitted.

When I started working on gcc 1.36 (company I was working for was designing Unix workstations and we were fixing the backend for MC680x0) we used RCS. But I'm not sure it was the original SCM, we didn't even have Internet access then :-) And we got gcc 1.35-36-37 "smuggled" to us on the 1/4" tape.

I was a MC680x0 maintainer back in those days. Also picked up i860 for the gcc 2.x stream. Fortunately I was at UMich in the gcc 1.x time, and we had NSFnet. And yes, I used RCS when working on the gcc source.

Nice to meet you! :-) I still (barely) remember one bug which gave me a hard time - when compiling for 68030, I believe, under certain conditions gcc put floating point variables initialized with a constant into the constant segment. Which caused access violation when code tried to put something else into this variable. Or something along these lines, when was that, 25 years ago? Circa 87 or 88.

We used 860 (not sure) and 960 (definitely) too for other products.

Re: 54-line if condition in gcc's reload.c

#94

Earlier quoted context omitted.

Old code is better - it's got bug fixes.

> Old code is better - it's got bug fixes. It's also got prototypes that made it into production, ball of mud designs that encourage usage bugs, and C++ thrown together by that short lived intern who took a few Java classes, wrote everything assuming there was a garbage collector around, and took great care to avoid class trees with less than 3 layers of inheritance lest he be shamed for lack of 1337ness... then topp…

To be fair, new code frequently has those attributes too.

Re: 54-line if condition in gcc's reload.c

#95
post #85
post #77

Earlier quoted context omitted.

For simplicity, a compiler manipulates an internal representation in terms of virtual registers. A register allocator assigns physical registers to these virtual ones, under the principle that different virtual registers may be assigned to the same physical one if they are not live (I.e. hold a value that will be used in the future) at the same time. Spill code generation is necessary because at a program point, ther…

Thanks everyone for watching another exciting episode of "Two Lawyers Explain Compiler Theory". :)

To be fair, I still manage the compiler team as well :)
Post reply on HN