Author: Whiteknight Date: Thu Oct 16 10:42:15 2008 New Revision: 31995 Modified: trunk/docs/pdds/pdd19_pir.pod
Log: [PDD] Add some more information about :unique_reg as per the discussion at RT#57636. Modified: trunk/docs/pdds/pdd19_pir.pod ============================================================================== --- trunk/docs/pdds/pdd19_pir.pod (original) +++ trunk/docs/pdds/pdd19_pir.pod Thu Oct 16 10:42:15 2008 @@ -229,7 +229,22 @@ The optional C<:unique_reg> modifier will force the register allocator to associate the identifier with a unique register for the duration of the -subroutine. +subroutine. If the register allocator is thought of as an optimization +tool for allowing fewer registers to be used in a register frame by reusing +unused registers, then the C<:unique_reg> directive forces this +optimization to be turned off. This can be important in a number of +situations: + +=over 4 + +=item* When a subroutine has a small fixed number of registers + +=item* When a named variable or named register is used throughout the entire +subroutine + +=item* When a reference needs to be made to a register + +=back =item .lex <string constant>, <reg>