Append elem to the elems comprising the current block. Read in an expression and put it in curblock.Belem. If there is one already there, create a tree like: , / \ old e
Clear visit.
Compute number of parents (Bcount) of each basic block.
Mark end of function. flag: 0 do a "return" 1 do a "return 0"
Free a block.
Finish up this block and start the next one.
Goto a block named gotolbl. Start a new block that is labelled by newlbl.
Mark curblock as initializing Symbol s.
Finish up this block and start the next one.
Free optimizer gathered data.
Build predecessor list (Bpred) for each block.
Replace block numbers with block pointers. Also compute numblks and maxblks.
Visit block and each of its predecessors.
Free list of blocks.
Hydrate/dehydrate a list of blocks.
Perform branch optimization on basic blocks.
Try to remove control structure. That is, try to resolve if-else, goto and return statements into &&, || and ?: combinations.
Compute depth first order (DFO). Equivalent to Aho & Ullman Fig. 13.8. Blocks not in dfo[] are unreachable.
Determine if function has any side effects. This means, determine if all the function does is return a value; no extraneous definitions or effects or exceptions. A function with no side effects can be CSE'd. It does not reference statics or indirect references.
Compiler implementation of the D programming language.