Abstract
This paper discusses some of the constraints which should be placed on compiler optimization. First, the optimized program should produce the same output as the original program and second, the optimizer should not introduce new error side effects, such as a divide-check interrupt. The latter restriction might be called the safety constraint. Once these constraints are defined, the remainder of the paper is devoted to an algorithm which determines when it is“safe”to move expressions out of loops.