Files
mercury/compiler/notes/ALLOCATION
Thomas Conway 3c63bf142d design of the storage allocation policy
ALLOCATION:
	design of the storage allocation policy
1994-08-10 11:00:06 +00:00

13 lines
416 B
Plaintext

Strategy for allocating storage:
1. Allocate stack for variables which HAVE to have it.
2. Assign 'known' locations for variables at the end of branches.
2a if the variable is in follow_vars, use that location
2b if the variable is not then use goalinfo derived information
ELSE use stack location ELSE panic
3. Assign inbetween locations for eager code generation:
use 2a, 2b, allocate 'any' free register.