Constant folding
Constant folding are related compiler optimizations used by many modern compilers that evaluate expressions whose values are known at compile time and replaces them with the computed result. For example, an expression such as 2 * 3 can be replaced by 6 before the program is run.
It is often used together with constant propagation, which substitutes variables whose values are known to be constant. An advanced form of constant propagation known as sparse conditional constant propagation can more accurately propagate constants and simultaneously remove dead code.