Loop-invariant code motion (also called hoisting or scalar promotion) is a compiler optimization which performs this ...
en.m.wikipedia.org