Browse Source

Save input values beforehand. Clean up and refactor spill code.

cache-refactoring
Aleksey Demakov 19 years ago
parent
commit
7090cf19fc
  1. 11
      ChangeLog
  2. 743
      jit/jit-reg-alloc.c
  3. 5
      jit/jit-reg-alloc.h

11
ChangeLog

@ -1,3 +1,14 @@
2006-05-19 Aleksey Demakov <ademakov@gmail.com>
* jit-reg-alloc.h, jit/jit-reg-alloc.c: determine if input values
need to be saved and evicted from registers to stack frame at the
_jit_regs_assign() time. Uniformly save input values that need to
in _jit_regs_gen(), do not save them in _jit_regs_commit(). This
simplifies handling of stack registers. Remove initial_stack_top,
exchanges, num_exchages fields from the _jit_regs_t struct. Add
save and kill bit fields to the _jit_regdesc_t struct. Refactor
and clean up code.
2006-05-10 Aleksey Demakov <ademakov@gmail.com> 2006-05-10 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.c (use_cheapest_register): check if the other * jit/jit-reg-alloc.c (use_cheapest_register): check if the other

743
jit/jit-reg-alloc.c

File diff suppressed because it is too large

5
jit/jit-reg-alloc.h

@ -120,8 +120,10 @@ typedef struct
unsigned clobber : 1; unsigned clobber : 1;
unsigned early_clobber : 1; unsigned early_clobber : 1;
unsigned duplicate : 1; unsigned duplicate : 1;
unsigned save : 1;
unsigned load : 1; unsigned load : 1;
unsigned copy : 1; unsigned copy : 1;
unsigned kill : 1;
} _jit_regdesc_t; } _jit_regdesc_t;
@ -162,12 +164,9 @@ typedef struct
jit_regused_t spill; jit_regused_t spill;
int stack_start; int stack_start;
int initial_stack_top;
int current_stack_top; int current_stack_top;
int wanted_stack_count; int wanted_stack_count;
int loaded_stack_count; int loaded_stack_count;
int exchanges[_JIT_REGS_MAX_EXCHANGES][2];
int num_exchanges;
} _jit_regs_t; } _jit_regs_t;
void _jit_regs_init(_jit_regs_t *regs, int flags); void _jit_regs_init(_jit_regs_t *regs, int flags);

Loading…
Cancel
Save