This is an archive of the discontinued LLVM Phabricator instance.

[mips][mc] Emit R_{MICRO}MIPS_JALR when expanding jal to jalr
ClosedPublic

Authored by vstefanovic on Dec 4 2018, 1:03 PM.

Details

Summary

When replacing jal with jalr, also emit '.reloc R_MIPS_JALR' (R_MICROMIPS_JALR
for micromips).
The linker might then be able to turn jalr into a direct call.
Add '-mips-jalr-reloc' to enable/disable this feature (default is true).

Diff Detail

Repository
rL LLVM

Event Timeline

vstefanovic created this revision.Dec 4 2018, 1:03 PM
This revision is now accepted and ready to land.Dec 5 2018, 8:35 AM
This revision was automatically updated to reflect the committed changes.