This is an archive of the discontinued LLVM Phabricator instance.

[LoongArch] Add support for tail call optimization
ClosedPublic

Authored by wangleiat on Nov 12 2022, 1:40 AM.

Details

Summary

This patch adds tail call support to the LoongArch backend. When
appropriate, use the b or jr instruction for tail calls (the
pcalau12i+jirl instruction pair when use medium codemodel).

This patch also modifies the inappropriate operand name:
simm26_bl -> simm26_symbol

This has been modeled after RISCV's tail call opt.

Diff Detail

Event Timeline

wangleiat created this revision.Nov 12 2022, 1:40 AM
wangleiat requested review of this revision.Nov 12 2022, 1:40 AM
SixWeining accepted this revision.Nov 16 2022, 8:07 PM
SixWeining retitled this revision from [LoongArch] Add support for tail call to [LoongArch] Add support for tail call optimization.
SixWeining edited the summary of this revision. (Show Details)

LGTM.

This revision is now accepted and ready to land.Nov 16 2022, 8:09 PM
This revision was landed with ongoing or failed builds.Nov 19 2022, 1:36 AM
This revision was automatically updated to reflect the committed changes.