3 ms·
The syntax-tree driven approach is considerably simpler than Sethi-Ullman, and faster. If you read the blog post, you can see it's based on a 1990 paper that re
by titzer 3y ago
The syntax-tree driven approach is considerably simpler than Sethi-Ullman, and faster. If you read the blog post, you can see it's based on a 1990 paper that references the 1970 paper that introduced the Sethi-Ullman algorithm. So neither the blog author (hi Max) nor the authors of the 1990 paper were unaware of it.
- lboasso 3y agoIt would be great to have a simple Virgil x86-64 backend based only on the destination-driven code generation technique, and compare the performance of the generated code (and compilation speed) with the official optimizing x86-64 backend. Would the implementation effort be comparable to the JVM backend? BTW I really like the design of Virgil described in "Harmonizing Classes, Functions, Tuples,and Type Parameters in Virgil III", bravo!
- titzer 3y agoThanks. Interesting thought. The current Virgil compiler translates from the AST directly to SSA quite early. Specialization, analysis, data representation choices, and lowering all happen on SSA. Translating directly to machine code from the AST and using destination-driven allocation could maybe work for a simple subset with easy lowering, which would give an indication of the compile speed improvements possible.
- tekknolagi 3y agoHi Ben!