So to generalize.  The following registers are available, under the
following conditions:

* Registers R16-R31 are always available for the allocator.
* Registers R0-R15 are available between sub calls.  That is, for any
symbol, whose life range does not cross a subroutine.  (This implies
that all registers are available if no subs are called.)  Since we
have no way to determine if a sub is using those or not, any sub call
will be assumed to possibly use R0-R15.  Furthermore, even though we
know there are certain registers in that range, which are unused by
the calling convention, we will still not use them through a sub call
for security reasons.
* [NEW] If register 15 or below is used, it should be cleared out,
ZEROED, after it's last use and before the next sub call.  This is for
security reasons.  Obviously, these registers will not be the first
choice to use.
* Availability of these registers is subject to the rules for using
the Parrot opcode C<setp_ind Ix, Py>, which were (are being?) worked
through by Leo.

Other observations:

* Leo introduced a flag on the symbol, to indicate if it's volatile or
not.  These will be eligible for R0-R15 (volitile registers?).
* From new allocator bugs, and analysis, we've discovered that
exceptions cause new control flow edges, not previously considerd. 
This case is being reworked by Leo?  to provide missing CFG edges,
through a minor change in the try block declaration.  (thread
"Continuations, basic blocks, loops and register allocation")
* The case of continuations has not been solved with respect to
register alloction.  Leo's RESUMEABLE: label might provide help here. 
In any case, we can expect to see some additional edges being inserted
though.  (also thread "Continuations, basic blocks, loops and register
allocation")

Did I miss anything?

Reply via email to