From f9dd5bf5e69b375bb19703ff0cf4bdc99fdc258e Mon Sep 17 00:00:00 2001 From: florian Date: Fri, 17 Aug 2012 19:35:51 +0000 Subject: [PATCH] + live_start and live_end_properties git-svn-id: trunk@22109 - --- compiler/rgobj.pas | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/compiler/rgobj.pas b/compiler/rgobj.pas index 0c5509952e..f7b08c9a01 100644 --- a/compiler/rgobj.pas +++ b/compiler/rgobj.pas @@ -128,7 +128,7 @@ unit rgobj; by cpu-specific implementations. --------------------------------------------------------------------} - trgobj=class + trgobj=class preserved_by_proc : tcpuregisterset; used_in_proc : tcpuregisterset; @@ -244,8 +244,14 @@ unit rgobj; procedure assign_colours; procedure clear_interferences(u:Tsuperregister); procedure set_live_range_direction(dir: TRADirection); + procedure set_live_start(reg : tsuperregister;t : tai); + function get_live_start(reg : tsuperregister) : tai; + procedure set_live_end(reg : tsuperregister;t : tai); + function get_live_end(reg : tsuperregister) : tai; public property live_range_direction: TRADirection read int_live_range_direction write set_live_range_direction; + property live_start[reg : tsuperregister]: tai read get_live_start write set_live_start; + property live_end[reg : tsuperregister]: tai read get_live_end write set_live_end; end; const @@ -715,6 +721,30 @@ unit rgobj; end; + procedure trgobj.set_live_start(reg: tsuperregister; t: tai); + begin + reginfo[reg].live_start:=t; + end; + + + function trgobj.get_live_start(reg: tsuperregister): tai; + begin + result:=reginfo[reg].live_start; + end; + + + procedure trgobj.set_live_end(reg: tsuperregister; t: tai); + begin + reginfo[reg].live_end:=t; + end; + + + function trgobj.get_live_end(reg: tsuperregister): tai; + begin + result:=reginfo[reg].live_end; + end; + + procedure trgobj.add_reg_instruction(instr:Tai;r:tregister;aweight:longint); var supreg : tsuperregister; @@ -1630,7 +1660,6 @@ unit rgobj; so:pshifterop; {$endif arm} - begin { Leave when no imaginary registers are used } if maxreg<=first_imaginary then