Remove unneeded snapshot preps for sunk stores.
This commit is contained in:
@@ -693,7 +693,7 @@ static void asm_newref(ASMState *as, IRIns *ir)
|
||||
{
|
||||
const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_tab_newkey];
|
||||
IRRef args[3];
|
||||
if (ir->r == RID_SINK) /* Sink newref. */
|
||||
if (ir->r == RID_SINK)
|
||||
return;
|
||||
args[0] = ASMREF_L; /* lua_State *L */
|
||||
args[1] = ir->op1; /* GCtab *t */
|
||||
@@ -814,9 +814,7 @@ static void asm_fload(ASMState *as, IRIns *ir)
|
||||
|
||||
static void asm_fstore(ASMState *as, IRIns *ir)
|
||||
{
|
||||
if (ir->r == RID_SINK) { /* Sink store. */
|
||||
asm_snap_prep(as);
|
||||
} else {
|
||||
if (ir->r != RID_SINK) {
|
||||
Reg src = ra_alloc1(as, ir->op2, RSET_GPR);
|
||||
IRIns *irf = IR(ir->op1);
|
||||
Reg idx = ra_alloc1(as, irf->op1, rset_exclude(RSET_GPR, src));
|
||||
@@ -838,9 +836,7 @@ static void asm_xload(ASMState *as, IRIns *ir)
|
||||
|
||||
static void asm_xstore(ASMState *as, IRIns *ir, int32_t ofs)
|
||||
{
|
||||
if (ir->r == RID_SINK) { /* Sink store. */
|
||||
asm_snap_prep(as);
|
||||
} else {
|
||||
if (ir->r != RID_SINK) {
|
||||
Reg src = ra_alloc1(as, ir->op2, RSET_GPR);
|
||||
asm_fusexref(as, asm_fxstoreins(ir), src, ir->op1,
|
||||
rset_exclude(RSET_GPR, src), ofs);
|
||||
@@ -882,9 +878,7 @@ static void asm_ahuvload(ASMState *as, IRIns *ir)
|
||||
|
||||
static void asm_ahustore(ASMState *as, IRIns *ir)
|
||||
{
|
||||
if (ir->r == RID_SINK) { /* Sink store. */
|
||||
asm_snap_prep(as);
|
||||
} else {
|
||||
if (ir->r != RID_SINK) {
|
||||
RegSet allow = RSET_GPR;
|
||||
Reg idx, src = RID_NONE, type = RID_NONE;
|
||||
int32_t ofs = 0;
|
||||
@@ -1392,9 +1386,7 @@ static void asm_hiop(ASMState *as, IRIns *ir)
|
||||
asm_fpmin_max(as, ir-1, (ir-1)->o == IR_MIN ? CC_HI : CC_LO);
|
||||
return;
|
||||
} else if ((ir-1)->o == IR_XSTORE) {
|
||||
if ((ir-1)->r == RID_SINK)
|
||||
asm_snap_prep(as);
|
||||
else
|
||||
if ((ir-1)->r != RID_SINK)
|
||||
asm_xstore(as, ir, 4);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user