News for hackers. Stuff that matters.
Re:Want to Write a Compiler? Just Read These Two Papers. by thesz on Friday August 26, 2011 @09:05AM (#2928325)
>The authors promote using dozens or hundreds of compiler passes, each being as simple as possible. Don't combine transformations; keep them separate.

Actually, this way you will get an inferior compiler (optimizer).

http://lambda-the-ultimate.org/node/2387

The thesis referenced above argues (and provides examples) that you cannot overcome important problems by separating transformations. You need to combine them.

Re:Want to Write a Compiler? Just Read These Two Papers. by silentbicycle on Friday August 26, 2011 @09:07AM (#2928332)
The nanopass paper uses so many passes for pedagogy, not efficiency. Of course it's inefficient, that's not the point. They're still easier to teach in isolation.
Re:Want to Write a Compiler? Just Read These Two Papers. by jeffdavis on Friday August 26, 2011 @12:21PM (#2928928)
Are you talking about efficiency of the compiler or efficiency of the resulting code?

If it's just an inefficiency of the compiler, you can dismiss it. But if it's an inefficiency in the resulting code, then perhaps the many-pass design isn't adequate for teaching optimization.

Re:Want to Write a Compiler? Just Read These Two Papers. by thesz on Friday August 26, 2011 @12:34PM (#2928971)
The thesis I was talking about is about generated code.

Author of thesis is one of the authors of Blitz++: http://www.oonumerics.org/blitz/

The thesis came from his frustration when seemingly innocent changes provoke significant degradation in performance.

Re:Want to Write a Compiler? Just Read These Two Papers. by skew on Friday August 26, 2011 @05:32PM (#2930047)
> The thesis referenced above argues (and provides examples) that you cannot overcome important problems by separating transformations. You need to combine them.

The transformations need to be applied together, but they can be specified together. One of the many impressive things in that thesis is the framework which lets optimizations be independently specified, but applied together. Unfortunately, the code does not seem to be available.

For a more recent system that echoes that particular aspect and does come with code there is Hoopl http://www.cs.tufts.edu/~nr/pubs/dfopt-abstract.html

It's on hackage http://hackage.haskell.org/package/hoopl

Re:Want to Write a Compiler? Just Read These Two Papers. by joeyespo on Friday August 26, 2011 @10:23AM (#2928560)
I get a 403 error when trying to follow Lambda's link to the paper. Any mirrors?
Re:Want to Write a Compiler? Just Read These Two Papers. by thesz on Friday August 26, 2011 @10:53AM (#2928654)