Browse Source

_jit_regs_load_value: if a value is in a global register and it is


			
			
				cache-refactoring
			
			
		
Rhys Weatherley 21 years ago
parent
commit
8bc5c7af87
  1. 4
      ChangeLog
  2. 8
      jit/jit-reg-alloc.c

4
ChangeLog

@ -8,6 +8,10 @@
jit/jit-value.c, tools/gen-sel-parser.y: implement a simple global
register allocation policy, based on usage counts.
* jit/jit-reg-alloc.c (_jit_regs_load_value): if a value is in a
global register and it is not going to be destroyed by an instruction,
then use the global register as the operand.
2004-06-01 Rhys Weatherley <rweather@southern-storm.com.au>
* jit/jit-cache.c, jit/jit-elf-read.c, tools/gen-apply.c:

8
jit/jit-reg-alloc.c

@ -1026,6 +1026,14 @@ int _jit_regs_load_value
}
}
/* If the value is in a global register, and we are not going
to destroy the value, then use the global register itself.
This will avoid a redundant register copy operation */
if(value->in_global_register && !destroy)
{
return value->global_reg;
}
/* Search for a free register to hold the value */
reg = free_register_for_value(gen, value, &other_reg);
load_value(gen, reg, other_reg, value, destroy);

Loading…
Cancel
Save