Reorganize scalar evolution analysis.

This commit is contained in:
Mike Pall
2010-03-15 16:23:02 +01:00
parent a25a717089
commit 24402ede04
2 changed files with 32 additions and 7 deletions

View File

@@ -201,6 +201,16 @@ typedef struct BPropEntry {
/* Number of slots for the backpropagation cache. Must be a power of 2. */
#define BPROP_SLOTS 16
/* Scalar evolution analysis cache. */
typedef struct ScEvEntry {
IRRef1 idx; /* Index reference. */
IRRef1 start; /* Constant start reference. */
IRRef1 stop; /* Constant stop reference. */
IRRef1 step; /* Constant step reference. */
IRType1 t; /* Scalar type. */
uint8_t dir; /* Direction. 0: +, 1: -. */
} ScEvEntry;
/* 128 bit SIMD constants. */
enum {
LJ_KSIMD_ABS,
@@ -283,6 +293,8 @@ typedef struct jit_State {
BPropEntry bpropcache[BPROP_SLOTS]; /* Backpropagation cache slots. */
uint32_t bpropslot; /* Round-robin index into bpropcache slots. */
ScEvEntry scev; /* Scalar evolution analysis cache slots. */
const BCIns *startpc; /* Bytecode PC of starting instruction. */
TraceNo parent; /* Parent of current side trace (0 for root traces). */
ExitNo exitno; /* Exit number in parent of current side trace. */