Live data from Hacker News

CS 6120: Advanced Compilers: The Self-Guided Online Course (2020)

cs.cornell.edu

11–20 of 63 posts

Re: CS 6120: Advanced Compilers: The Self-Guided Online Course (2020)

#12
post #5

I'm a bit confused about what makes this course "advanced." Most of the topics (dead code elimination, data flow, dominator analysis, SSA form) seem like they belong in a first course on compilers.

I have read TONS of material about it*, and none of that is part of the majority of that!

In fact, the "backend" be compiler or interpreter is nearly always left as "exercise to reader".

You can't imagine how much is left to be discovered, from how make a closure, track environment, do pattern matching, memory representation, etc.

EVERYTHING interesting is something you need to look for.

P.D: This only one of the years:https://gist.githubusercontent.com/mamcx/e1743571b9a1ea163a7...

Re: CS 6120: Advanced Compilers: The Self-Guided Online Course (2020)

#13
post #2

The section on dynamic compilers is more or less all about trace compilation. Generally, trace compilation is a dead end and has been abandoned repeatedly. The more important concepts here are type feedback and speculation and deoptimization, as well as making fast compilers and tiering. The course overall looks good, and it's great that so much is available online, so well done, Adrian.

Has LuaJIT been superseded?

Re: CS 6120: Advanced Compilers: The Self-Guided Online Course (2020)

#14
post #2

The section on dynamic compilers is more or less all about trace compilation. Generally, trace compilation is a dead end and has been abandoned repeatedly. The more important concepts here are type feedback and speculation and deoptimization, as well as making fast compilers and tiering. The course overall looks good, and it's great that so much is available online, so well done, Adrian.

> Generally, trace compilation is a dead end and has been abandoned repeatedly.

JAX is a tracing compiler!

(I know, I know, it sits in an extremely different part of the problem space than TraceMonkey or LuaJIT. Still.)

Re: CS 6120: Advanced Compilers: The Self-Guided Online Course (2020)

#16
post #5

I'm a bit confused about what makes this course "advanced." Most of the topics (dead code elimination, data flow, dominator analysis, SSA form) seem like they belong in a first course on compilers.

What is advanced then? Good coverage of dce, data flow, ssa, intruction selection and reg alloc is actually like 98% of the backend.

Re: CS 6120: Advanced Compilers: The Self-Guided Online Course (2020)

#17
post #14
post #2

The section on dynamic compilers is more or less all about trace compilation. Generally, trace compilation is a dead end and has been abandoned repeatedly. The more important concepts here are type feedback and speculation and deoptimization, as well as making fast compilers and tiering. The course overall looks good, and it's great that so much is available online, so well done, Adrian.

> Generally, trace compilation is a dead end and has been abandoned repeatedly. JAX is a tracing compiler! (I know, I know, it sits in an extremely different part of the problem space than TraceMonkey or LuaJIT. Still.)

and PyPy right?

Re: CS 6120: Advanced Compilers: The Self-Guided Online Course (2020)

#18
post #15

Saw a podcast that talked about the rust compiler, which apparently included machine learning algorithms at some points to determine whether or not you had code that could crash your system

I've never heard about that and I'm pretty sure it's incorrect (although "machine learning" is a wide term), do you have a source for that?

Re: CS 6120: Advanced Compilers: The Self-Guided Online Course (2020)

#19
post #2

The section on dynamic compilers is more or less all about trace compilation. Generally, trace compilation is a dead end and has been abandoned repeatedly. The more important concepts here are type feedback and speculation and deoptimization, as well as making fast compilers and tiering. The course overall looks good, and it's great that so much is available online, so well done, Adrian.

PyTorch?

Re: CS 6120: Advanced Compilers: The Self-Guided Online Course (2020)

#20
post #14
post #2

The section on dynamic compilers is more or less all about trace compilation. Generally, trace compilation is a dead end and has been abandoned repeatedly. The more important concepts here are type feedback and speculation and deoptimization, as well as making fast compilers and tiering. The course overall looks good, and it's great that so much is available online, so well done, Adrian.

> Generally, trace compilation is a dead end and has been abandoned repeatedly. JAX is a tracing compiler! (I know, I know, it sits in an extremely different part of the problem space than TraceMonkey or LuaJIT. Still.)

Interesting. I think numerical computing is a narrow enough domain where programs have very well-behaved control flow, which avoids most of the problems of trace compilation. Loops over branchy code, which are really common in general programs, are very difficult to make work well with tracing.

Numerical programs being very stable in terms of control is what enables GPU parallelization and loop optimizations in the long tradition of Fortran compilers. Optimizations like loop tiling, interchange, strip mining, etc aren't going to be easy to do with trace compilation.

Anyway my comment was more directed toward trace compilation in the context of dynamic languages, and there I think it's pretty well established it only works well for small programs.

Post reply on HN