Settings

Theme

Abstract Interpretation in the Toy Optimizer

bernsteinbear.com

43 points by ChadNauseam 10 days ago · 7 comments

Reader

mccoyb 7 days ago

Abstract interpretation is also at the heart of Julia’s type inference algorithm (amongst other analyses that Julia performs)

A very useful framework, both practically and theoretically!

norir 7 days ago

I don't want an optimizer that eliminates an unnecessary operation. I want a compiler that tells me that it is unnecessary so I can remove it.

  • AlotOfReading 7 days ago

    This is operating on IR, not on lines of code. Figuring out where the operation came from is extremely difficult because you have to propagate all of that info back and forth across the passes, and it may end up being split "across" syntactic elements. If your language has any form of metaprogramming or code reuse (i.e. all of them), that operation may also be necessary at some use sites and not at others, among other issues.

  • tekknolagi 7 days ago

    This kind of compiler/runtime feedback about source code is really interesting and (imo) under-studied. Especially when you take into account something like PGO data.

  • maplant 7 days ago

    This is not always possible. Consider the monomorphized output of a generic function. An operation may be dead in one instance but not generally

  • dented42 7 days ago

    That kind of feedback is also possible within this framework in theory. It depends on at what level the abstract interpreter is operating. If it’s the source level then it’s easy, but propagating that from an IR to source code is, shall we say, an open question.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection