clobber overlapping locals in storeLocal; move fallback code in trySteal to increase its applicability

This commit is contained in:
Joel Dice 2008-12-22 17:55:29 -07:00
parent ac37941fa5
commit 897586aa76

View File

@ -1904,13 +1904,14 @@ trySteal(Context* c, Site* site, Value* thief, Value* victim, unsigned size,
success = true;
} else {
success = save(c, site, victim, size, stack, locals);
if ((not success)
and available(c, size, typeMask, registerMask, frameIndex))
{
move(c, stack, locals, size, victim, site,
allocateSite(c, typeMask, registerMask, frameIndex));
success = true;
}
}
if ((not success)
and available(c, size, typeMask, registerMask, frameIndex))
{
move(c, stack, locals, size, victim, site,
allocateSite(c, typeMask, registerMask, frameIndex));
success = true;
}
thief->thief = false;
@ -4802,6 +4803,12 @@ class MyCompiler: public Compiler {
clobber->footprint = 0;
}
if (index > 0 and local[-1].footprint == 2) {
Local* clobber = local - 1;
clobber->value = 0;
clobber->footprint = 0;
}
if (DebugFrame) {
fprintf(stderr, "store local %p of footprint %d at %d\n",
local->value, footprint, index);