Classic peephole optimization is not related to power reduction and other things that you call. These are 2-3 sequences of commands, for example,
BRANCH FALSE $1
BRANCH $2
$1:
which can be reduced to
BRANCH TRUE $2
Such sequences can occur in naive code generators, such as single-pass compilers that do not generate ASTs, for example, some of the COBOL compilers I worked on.
source
share