2 ms·
A simple compiler could just assume all registers are available when it generates code from a line of source because the language (C for example) has no concept
by phkahler 3y ago
A simple compiler could just assume all registers are available when it generates code from a line of source because the language (C for example) has no conception of CPU registers. That approach would lead to a LOT of redundant loads and stores for example. Register allocation to the rescue! But how smart can a single code generator be? How much can the process be holistic vs sequential steps. There is a complexity nightmare here and it needs to be broken down some way right?