New pages added to Project CompilerDev

All about the OSDev Wiki. Discussions about the organization and general structure of articles and how to use the wiki. Request changes here if you don't know how to use the wiki.
Post Reply
User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

New pages added to Project CompilerDev

Post by Schol-R-LEA »

I have added a new page on how compilers implement conditional statements and loops. It still needs extensive improvement, but I will continue working on it.

There is a standing plan to (eventually) create a separate wiki and forum for language design and compiler development. To this end, the OS wiki group established a set of pages for bootstrapping it, to be temporary hosted here.

No one else has worked on it for a while, as there hasn't been the necessary interest, but it is still there as there hasn't been any reason to remove it, and the specifics of compiler optimization do come up in OS dev.

A few days ago, the subject of what kind of code is generated for certain language constructs came up in the fora, and was relevant to OS dev (because a question arose about efficiency for explicit loops versus gotos - one of the posters was using goto extensively on this basis, and we were able to show that it was not faster in general), so I thought it would make sense to add this as a (sort of) permanent part of the CompilerDev wiki project.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Icee
Member
Member
Posts: 100
Joined: Wed Jan 08, 2014 8:41 am
Location: Moscow, Russia

Re: New pages added to Project CompilerDev

Post by Icee »

The transformation you are outlining at the end of the article is called loop inversion. Along with other control-flow optimizations it is nicely described and evaluated in Steven Muchnick's Advanced Compiler Design & Implementation (chapter 18). If simplicifation is also described there.
Post Reply