Page MenuHomePhabricator

[RISCV] Add support for lowering jumptables
Needs ReviewPublic

Authored by asb on Jun 21 2018, 7:02 AM.



Previously, the generation of jumptables was disabled. This patch adds the necessary support, as reflected in the updated output in test/CodeGen/RISCV/jumptable.ll.

Diff Detail

Event Timeline

asb created this revision.Jun 21 2018, 7:02 AM
sabuasal edited reviewers, added: sabuasal; removed: sameer.abuasal.Jun 27 2018, 2:50 PM
apazos added inline comments.Jun 27 2018, 6:01 PM

Alex, I see lower performance when creating jump tables. We might need to set a minimum JT entries value to avoid the degradation.

GCC using 5 as threshold to decide using jump table or not for RISC-V and LLVM using 4.


  • Note: targetm.have_casesi () return false for RISC-V.


jrtc27 added a subscriber: jrtc27.Dec 7 2018, 8:56 AM
lenary added a subscriber: lenary.Wed, Jul 31, 8:57 AM