- How do modern compilers choose which variables to put in registers? (langdev.stackexchange.com)
This is a very broad subject. The problem of deciding how to map a program with arbitrarily many variables onto a fixed set of registers is known as register allocation, and it has been the subject of much research, study, and engineering effort since the very earliest compilers. One of the canonical approaches, graph coloring, was first proposed in 1981. Countless other approaches and variants have been explored since then, and I cannot hope to cover the full breadth of the topic in a single answer.
And yf also thyne eye offende the plucke him oute and caste him from the. It is better for the to enter into lyfe with one eye then havyng two eyes to be cast into hell fyre.
Matthew 18:9 TYN