This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Add a G_BRJT opcode
ClosedPublic

Authored by aemerson on Jun 11 2019, 12:53 PM.

Details

Summary

This is a branch opcode that takes a jump table pointer, jump table index and an index into the table to do an indirect branch.

We pass both the table pointer and JTI to allow targets like ARM64 to more easily use the existing jump table compression optimization without having to walk up the block to find a paired G_JUMP_TABLE.

Diff Detail

Repository
rL LLVM

Event Timeline

aemerson created this revision.Jun 11 2019, 12:53 PM
arsenm added inline comments.Jun 13 2019, 1:51 PM
llvm/lib/CodeGen/MachineVerifier.cpp
1324–1325 ↗(On Diff #204135)

I think if you declared it as ptype0, you get this for free

aemerson marked an inline comment as done.Jun 13 2019, 4:11 PM
aemerson added inline comments.
llvm/lib/CodeGen/MachineVerifier.cpp
1324–1325 ↗(On Diff #204135)

I tried that but it doesn't seem to work.

aemerson updated this revision to Diff 204654.Jun 13 2019, 4:17 PM

Use ptype0.

arsenm accepted this revision.Jun 14 2019, 7:29 AM

LGTM

This revision is now accepted and ready to land.Jun 14 2019, 7:29 AM
This revision was automatically updated to reflect the committed changes.