【文章內(nèi)容簡(jiǎn)介】
void expensive reevaluation. The most mon form of code motion is loopinvariant code motion that moves statements that evaluate to the same value every iteration of the loop to somewhere outside the loop. Global optimizations Local optimizations ? Constant folding ? Constant propagation ? Algebraic simplification and reassociation ? Operator strength reduction ? Copy propagation ? Dead code elimination ? Common subexpression elimination Controlflow analysis The piler has done an enormous amount of analysis, but it still doesn’t really know how the program does what it does. In controlflow analysis, the piler figures out even more information about how the program does its work, only now it can assume that there are no syntactic or semantic errors in the code. Controlflow analysis begins by constructing a controlflow graph, which is a graph