When we are trying to fill the delay slot of a call instruction, we must avoid
filler instructions that use the $ra register. This fixes the test
MultiSource/Applications/JM/lencod when we enable the forward delay slot filler.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM with a couple minor changes.
lib/Target/Mips/MipsDelaySlotFiller.cpp | ||
---|---|---|
319–322 ↗ | (On Diff #25480) | Can you use this?: if (MI.definesRegister(Mips::RA)) Defs.set(Mips::RA); if (MI.definesRegister(Mips::RA_64)) Defs.set(Mips::RA_64); so we don't add defs that weren't in the original instruction. Could you also elaborate on the comment to explain the quirk that makes this necessary. The delay slot is very slightly inside the function. It's sufficiently inside that RA/RA_64 have already been updated and must be preserved, but not so far inside that we can't preserve values in the other callee-saved registers. |