The MASM Forum Archive 2004 to 2012

Specialised Projects => Assembler/Compiler Technology => Topic started by: cman on January 11, 2010, 09:30:00 PM

Title: Lazy Code Motion
Post by: cman on January 11, 2010, 09:30:00 PM
I don't know if anyone else is reading this, but on page 649 - 650 of Compilers , Principle , Techniques and Tools , 2nd Edition the author uses a notation like "anticipated [ B ].in" to refer to a set of expressions. Does this mean the "anticipated" expressions coming into block "B". The author isn't too clear on this. Thanks for any information.
Title: Re: Lazy Code Motion
Post by: tenkey on January 28, 2010, 07:07:16 AM
Muchnick, in a different book, uses the term "anticipatable".

An expression is anticipatable if it can be moved to the beginning of a basic block without affecting computations.
The anticipatable expression can come from successor blocks, if ALL immediate successor blocks have the same expression as anticipatable, and the block (of current interest) does not prevent the expression from moving to the beginning.

So it's a subset of expressions that are expected to be evaluated later after entry to the block.