Don't eliminate SLOAD restores across RETF.

Move restore-elimination logic into snapshot_slots().
This commit is contained in:
Mike Pall
2010-02-23 03:08:49 +01:00
parent f751cd1d6f
commit c1362dcac9
3 changed files with 13 additions and 6 deletions

View File

@@ -2581,9 +2581,7 @@ static void asm_stack_restore(ASMState *as, SnapShot *snap)
int32_t ofs = 8*((int32_t)s-1);
IRRef ref = snap_ref(sn);
IRIns *ir = IR(ref);
/* No need to restore readonly slots and unmodified non-parent slots. */
if (ir->o == IR_SLOAD && ir->op1 == s &&
(ir->op2 & (IRSLOAD_READONLY|IRSLOAD_PARENT)) != IRSLOAD_PARENT)
if ((sn & SNAP_NORESTORE))
continue;
if (irt_isnum(ir->t)) {
Reg src = ra_alloc1(as, ref, RSET_FPR);