[llvm-commits] CVS: llvm/include/llvm/Bitcode/LLVMBitCodes.h

Chris Lattner sabre at nondot.org
Wed Apr 25 22:53:23 PDT 2007



Changes in directory llvm/include/llvm/Bitcode:

LLVMBitCodes.h updated: 1.7 -> 1.8
---
Log message:

start defining codes for instructions


---
Diffs of the changes:  (+34 -6)

 LLVMBitCodes.h |   40 ++++++++++++++++++++++++++++++++++------
 1 files changed, 34 insertions(+), 6 deletions(-)


Index: llvm/include/llvm/Bitcode/LLVMBitCodes.h
diff -u llvm/include/llvm/Bitcode/LLVMBitCodes.h:1.7 llvm/include/llvm/Bitcode/LLVMBitCodes.h:1.8
--- llvm/include/llvm/Bitcode/LLVMBitCodes.h:1.7	Wed Apr 25 22:26:26 2007
+++ llvm/include/llvm/Bitcode/LLVMBitCodes.h	Thu Apr 26 00:53:04 2007
@@ -29,11 +29,10 @@
   
     // Module sub-block id's
     TYPE_BLOCK_ID            = 1,
-    MODULEINFO_BLOCK_ID      = 2,
-    CONSTANTS_BLOCK_ID       = 3,
-    FUNCTION_BLOCK_ID        = 4,
-    TYPE_SYMTAB_BLOCK_ID     = 5,
-    VALUE_SYMTAB_BLOCK_ID    = 6
+    CONSTANTS_BLOCK_ID       = 2,
+    FUNCTION_BLOCK_ID        = 3,
+    TYPE_SYMTAB_BLOCK_ID     = 4,
+    VALUE_SYMTAB_BLOCK_ID    = 5
   };
   
   
@@ -81,7 +80,6 @@
     // Any other type code is assumed to be an unknown type.
   };
   
-  
   // The type symbol table only has one code (TST_ENTRY_CODE).
   enum TypeSymtabCodes {
     TST_CODE_ENTRY = 1     // TST_ENTRY: [typeid, namelen, namechar x N]
@@ -151,6 +149,36 @@
     BINOP_XOR  = 12
   };
   
+  
+  // The function body block (FUNCTION_BLOCK_ID) describes function bodies.  It
+  // can contain a constant block (CONSTANTS_BLOCK_ID).
+  enum FunctionCodes {
+    FUNC_CODE_DECLAREBLOCKS    =  1, // DECLAREBLOCKS: [n]
+    
+    FUNC_CODE_INST_BINOP       =  2, // BINOP:      [opcode, ty, opval, opval]
+    FUNC_CODE_INST_CAST        =  3, // CAST:       [opcode, ty, opty, opval]
+    FUNC_CODE_INST_GEP         =  4, // GEP:        [n, n x operands]
+    FUNC_CODE_INST_SELECT      =  5, // SELECT:     [ty, opval, opval, opval]
+    FUNC_CODE_INST_EXTRACTELT  =  6, // EXTRACTELT: [opty, opval, opval]
+    FUNC_CODE_INST_INSERTELT   =  7, // INSERTELT:  [ty, opval, opval, opval]
+    FUNC_CODE_INST_SHUFFLEVEC  =  8, // SHUFFLEVEC: [ty, opval, opval, opval]
+    FUNC_CODE_INST_CMP         =  9, // CMP:        [opty, opval, opval, pred]
+    
+    FUNC_CODE_INST_RET         = 10, // RET:        [opval<optional>]
+    FUNC_CODE_INST_BR          = 11, // BR:         [opval, bb#, bb#] or [bb#]
+    FUNC_CODE_INST_SWITCH      = 12, // SWITCH:     [opty, opval, n, n x ops]
+    FUNC_CODE_INST_INVOKE      = 13, // INVOKE:
+    FUNC_CODE_INST_UNWIND      = 14, // UNWIND
+    FUNC_CODE_INST_UNREACHABLE = 15, // UNREACHABLE
+    
+    FUNC_CODE_INST_MALLOC      = 16, // MALLOC: ..
+    FUNC_CODE_INST_FREE        = 17, // FREE: ..
+    FUNC_CODE_INST_ALLOCA      = 18, // ALLOCA: ..
+    FUNC_CODE_INST_LOAD        = 19, // LOAD: ..
+    FUNC_CODE_INST_STORE       = 20, // STORE: ..
+    FUNC_CODE_INST_CALL        = 21, // CALL: ..
+    FUNC_CODE_INST_VAARG       = 22  // VAARG: ..
+  };
 } // End bitc namespace
 } // End llvm namespace
 






More information about the llvm-commits mailing list