Criteria for placing a register variable in the CPU register?

Declaring a variable register is a suggestion to the compiler so that, if possible, a specific automatic variable is assigned, if possible.

But how does the compiler decide when to put the registration variable in the CPU register? What algorithm / mechanism does it use to solve?

Thank,

Naveen

+3
source share
4 answers

In the event that Norman Ramsey does not notice this and does not respond, perhaps a pointer to one of his documents will be in order.

( , ). (Just In Time) -, (, linear scan), ' , .

+5

, . - , .

, . , , , .

, , , register.

+1

, GCC (4.5.x +) SSA- ( ), SSA-

+1

register . , , . , . (JIT) , , .
(DAG) ( ).
.: 1. : .
2. V

0
source

Source: https://habr.com/ru/post/1767825/


All Articles