Add enum for compaction table.
[oota-llvm.git] / include / llvm / Bytecode / Format.h
1 //===-- llvm/Bytecode/Format.h - VM bytecode file format info ---*- C++ -*-===//
2 // 
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 // 
8 //===----------------------------------------------------------------------===//
9 //
10 // This header defines intrinsic constants that are useful to libraries that 
11 // need to hack on bytecode files directly, like the reader and writer.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_BYTECODE_FORMAT_H
16 #define LLVM_BYTECODE_FORMAT_H
17
18 namespace llvm {
19
20 class BytecodeFormat {   // Throw the constants into a poorman's namespace...
21   BytecodeFormat();      // do not implement
22 public:
23
24   // ID Numbers that are used in bytecode files...
25   enum FileBlockIDs {
26     // File level identifiers...
27     Module = 0x01,
28
29     // Module subtypes:
30     Function = 0x11,
31     ConstantPool,
32     SymbolTable,
33     ModuleGlobalInfo,
34     GlobalTypePlane,
35
36     // Function subtypes:
37     // Can also have ConstantPool block
38     // Can also have SymbolTable block
39     BasicBlock = 0x31,// May contain many basic blocks (obsolete since LLVM 1.1)
40
41     // InstructionList - The instructions in the body of a function.  This
42     // superceeds the old BasicBlock node used in LLVM 1.0.
43     InstructionList = 0x32,
44
45     // CompactionTable - blocks with this id are used to define local remapping
46     // tables for a function, allowing the indices used within the function to
47     // be as small as possible.  This often allows the instructions to be
48     // encoded more efficiently.
49     CompactionTable = 0x33,
50   };
51 };
52
53 } // End llvm namespace
54
55 #endif