This is an archive of the discontinued LLVM Phabricator instance.

[LoongArch] Support lowering br_jt
ClosedPublic

Authored by xen0n on Aug 25 2022, 6:34 AM.

Details

Summary

Jump tables cannot be generated yet, due to missing support for emitting
local addresses.

Diff Detail

Event Timeline

xen0n created this revision.Aug 25 2022, 6:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2022, 6:34 AM
xen0n requested review of this revision.Aug 25 2022, 6:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2022, 6:34 AM
SixWeining accepted this revision.Aug 25 2022, 7:08 PM

LGTM. Thanks!
In future maybe we should set the minimum number of entries to use a jump table according to benchmark.

This revision is now accepted and ready to land.Aug 25 2022, 7:08 PM
gonglingqin accepted this revision.Aug 25 2022, 8:12 PM

LGTM. Thanks.

xen0n added a comment.Aug 25 2022, 8:22 PM

LGTM. Thanks!
In future maybe we should set the minimum number of entries to use a jump table according to benchmark.

Of course. RISCV uses 5 but they didn't provide justification for the choice, we could initially use 5 too but revisit this once benchmark data is ready.

This revision was automatically updated to reflect the committed changes.