[llvm-branch-commits] [llvm] 943ed5c - [docs][GlobalISel]Adding info for G_JUMP_TABLE generic opcode

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Oct 20 09:28:33 PDT 2021


Author: pooja2299
Date: 2021-08-17T17:14:57+05:30
New Revision: 943ed5c6b95054c7efecf2b3d4b4df069907f4dc

URL: https://github.com/llvm/llvm-project/commit/943ed5c6b95054c7efecf2b3d4b4df069907f4dc
DIFF: https://github.com/llvm/llvm-project/commit/943ed5c6b95054c7efecf2b3d4b4df069907f4dc.diff

LOG: [docs][GlobalISel]Adding info for G_JUMP_TABLE generic opcode

Added description of jump table and G_JUMP_TABLE opcode.

Differential Revision: https://reviews.llvm.org/D107630

Added: 
    

Modified: 
    llvm/docs/GlobalISel/GenericOpcode.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/GlobalISel/GenericOpcode.rst b/llvm/docs/GlobalISel/GenericOpcode.rst
index 5f1ac067d9f90..899aa06fd0699 100644
--- a/llvm/docs/GlobalISel/GenericOpcode.rst
+++ b/llvm/docs/GlobalISel/GenericOpcode.rst
@@ -798,9 +798,19 @@ Indirect branch to jump table entry
 G_JUMP_TABLE
 ^^^^^^^^^^^^
 
-.. caution::
+Generates a pointer to the address of the jump table specified by the source 
+operand. The source operand is a jump table index. A jump table is an array 
+of addresses the CPU should jump to based on certain conditions.
+G_JUMP_TABLE can be used in conjunction with G_BRJT to support jump table 
+codegen with GlobalISel.
+
+.. code-block:: none
+
+  %dst:_(p0) = G_JUMP_TABLE %jump-table.0
+
+The above example generates a pointer to the source jump table index. Source 
+operand must be a jump table index.
 
-  I found no documentation for this instruction at the time of writing.
 
 G_INTRINSIC, G_INTRINSIC_W_SIDE_EFFECTS
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


        


More information about the llvm-branch-commits mailing list