mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1096138 - IonMonkey: Augment Nops with Mops to avoid collisions with fixed live ranges r=jandem
This commit is contained in:
parent
f85e7a0f62
commit
b2b9b81990
@ -1791,6 +1791,11 @@ CodeGenerator::visitNop(LNop *lir)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
CodeGenerator::visitMop(LMop *lir)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
CodeGenerator::visitOsiPoint(LOsiPoint *lir)
|
||||
{
|
||||
|
@ -63,6 +63,7 @@ class CodeGenerator : public CodeGeneratorSpecific
|
||||
|
||||
void visitLabel(LLabel *lir);
|
||||
void visitNop(LNop *lir);
|
||||
void visitMop(LMop *lir);
|
||||
void visitOsiPoint(LOsiPoint *lir);
|
||||
void visitGoto(LGoto *lir);
|
||||
void visitTableSwitch(LTableSwitch *ins);
|
||||
|
@ -43,6 +43,12 @@ class LNop : public LInstructionHelper<0, 0, 0>
|
||||
LIR_HEADER(Nop)
|
||||
};
|
||||
|
||||
class LMop : public LInstructionHelper<0, 0, 0>
|
||||
{
|
||||
public:
|
||||
LIR_HEADER(Mop)
|
||||
};
|
||||
|
||||
// An LOsiPoint captures a snapshot after a call and ensures enough space to
|
||||
// patch in a call to the invalidation mechanism.
|
||||
//
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define LIR_COMMON_OPCODE_LIST(_) \
|
||||
_(Label) \
|
||||
_(Nop) \
|
||||
_(Mop) \
|
||||
_(OsiPoint) \
|
||||
_(MoveGroup) \
|
||||
_(Integer) \
|
||||
|
@ -4117,10 +4117,20 @@ LIRGenerator::visitInstruction(MInstruction *ins)
|
||||
ins->setInWorklistUnchecked();
|
||||
#endif
|
||||
|
||||
// If we added a Nop for this instruction, we'll also add a Mop, so that
|
||||
// that live-ranges for fixed register defs, which with LSRA extend through
|
||||
// the Nop so that they can extend through the OsiPoint don't, with their
|
||||
// one-extra extension, extend into a position where they use the input
|
||||
// move group for the following instruction.
|
||||
bool needsMop = !current->instructions().empty() && current->rbegin()->isNop();
|
||||
|
||||
// If no safepoint was created, there's no need for an OSI point.
|
||||
if (LOsiPoint *osiPoint = popOsiPoint())
|
||||
add(osiPoint);
|
||||
|
||||
if (needsMop)
|
||||
add(new(alloc()) LMop);
|
||||
|
||||
return !gen->errored();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user