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

PoojaYadav via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 14 23:11:44 PDT 2021


pooja2299 added inline comments.


================
Comment at: llvm/docs/GlobalISel/GenericOpcode.rst:809
+
+  %dst:_(s32) = G_JUMP_TABLE %jump-table.0
+
----------------
paquette wrote:
> 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.
ok sure


================
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.
----------------
paquette wrote:
> 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. :)
> 
> 
ok will do that


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