Three optimization methods are confused
- How do you exactly do "normal"?
- How does Kleene's fixed point theorem help with optimization?
- How to eliminate free variables from local function definitions in programs written in non-functional languages?
EDIT: These are NOT my homemade questions. I am on summer vacation.
EDIT2: Well, I'm just starting out to learn compiler optimization and don't have any specific code that I want to optimize. Could you just tell me what general techniques you can use with the above three optimization techniques, or at least tell me how to explain them correctly?
a source to share
- The general is done with bottom-up hashing.
- Klein's theorem allows the compiler to iteratively solve recursion equations that gives facts about the program. A simple example of a fact is that at a certain point a variable is
i
always 0. - If you have a local function with free variables that are bound by binding or lambda bound in the enclosing function, then by definition you are dealing with a language that has first-class features. Free variables are usually handled by converting the closure, although some compilers use lambda lifting.
Recommended search terms:
- Tail from bottom to top
- Destroying a general subexpression
- Iterative data flow analysis
- Data flow optimization made easy
- Continuation-walkthrough, close-close style
- Closing the transformation
- Lambda lifting
a source to share
This is what I found online, if anyone has access to more information please answer.
William Klinger teaches the above two methods and discusses the more interesting ones in his class: http://www.ccis.neu.edu/home/will/csg262_fall2004/syllabus.html
These guys are using Klein algebra to analyze data flow. I think we can use it in compiler optimization: http://ieeexplore.ieee.org/Xplore/login.jsp?url=http://ieeexplore.ieee.org/iel5/4159639/4159640/04159673.pdf%3Fisnumber % 3D4159640% 26prod% 3DCNF% 26arnumber% 3D4159673% 26arSt% 3D201% 26ared% 3D210% 26arAuthor% 3DFernandes% 252C% 2BT. & AuthDecision = -203
Unfortunately, the above paper requires a login.
Here's what I found about distribution (but didn't help much): http://www.patentsurf.net/7,516,448
a source to share
Good answer from Norman. (I just hope your prof. Is not confusing the optimizations the compiler might make with the optimizations the programmer might make. The latter is a less technical subject, so this is not the case, but in a real application it is an order of magnitude more significant.)
a source to share