This is an archive of the discontinued LLVM Phabricator instance.

[JITLink][RISCV] Support relaxable edges without relaxation pass
ClosedPublic

Authored by jobnoorman on Jun 22 2023, 6:04 AM.

Details

Summary

Relaxable edges are created unconditionally, even when the relaxation
pass will not run. However, they were not recognized by applyFixup
causing them to not be applied.

To support configurations without the relaxation pass, this patch adds
these relaxable edges to applyFixup:

  • CallRelaxable: Can be treated as R_RISCV_CALL
  • AlignRelaxable: Can simply be ignored

An alternative could be to unconditionally run the relaxation pass, even
in contexts where shouldAddDefaultTargetPasses returns false. However, I
could imagine there being use cases for disabling relaxation which
wouldn't be possible anymore then.

Diff Detail

Event Timeline

jobnoorman created this revision.Jun 22 2023, 6:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2023, 6:04 AM
Herald added subscribers: asb, luke, pmatos and 28 others. · View Herald Transcript
jobnoorman requested review of this revision.Jun 22 2023, 6:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2023, 6:04 AM
This revision is now accepted and ready to land.Jun 23 2023, 8:18 AM