[PATCH] D107630: [docs][GlobalISel]Adding info for G_JUMP_TABLE generic opcode

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 13 15:15:07 PDT 2021


paquette added a comment.

Did some git archaeology to give some better feedback. :)



================
Comment at: llvm/docs/GlobalISel/GenericOpcode.rst:809
+
+  %dst:_(s32) = G_JUMP_TABLE %jump-table.0
+
----------------
When it's a pointer, we should use `pN`, where `N` is the address space.

I think 0 is the default, so you can probably just use that.


================
Comment at: llvm/docs/GlobalISel/GenericOpcode.rst:811
+
+The above example shows assignment of pointer to jump table of given index.
+Source operand must be a jump table index.
----------------
I took a look at the commit that added G_JUMP_TABLE to GenericOpcodes.td (d133c1592560edb77958492a77e4e871b21a9d52)

The message says:

> [GlobalISel] Add a G_JUMP_TABLE opcode.
> 
> This opcode generates a pointer to the address of the jump table
> specified by the source operand, which is a jump table index.
> 
> It will be used in conjunction with an upcoming G_BRJT opcode to support
> jump table codegen with GlobalISel.
> 
> Differential Revision: https://reviews.llvm.org/D63111

So I think that we should basically use that description here. :)




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107630/new/

https://reviews.llvm.org/D107630



More information about the llvm-commits mailing list