Changes to the V2 bytecode format:

- Null values are implicitly encoded instead of explicitly, this makes
    things more compact!
  - More compactly represent ConstantPointerRefs
  - Bytecode files are represented as:
      Header|GlobalTypes|GlobalVars/Function Protos|Constants|Functions|SymTab
    instead of
      Header|GlobalTypes|Constants|GlobalVars/Function Protos|Functions|SymTab
    which makes a lot of things simpler.

Writer changes:
  - We now explictly encode versioning information in the bytecode files.
  - This allows new code to read bytecode files produced by old code, but
    new bytecode files can have enhancements such as the above.  Although this
    makes the reader a bit more complex (having to deal with old formats), the
    writer only needs to be able to produce the most recent version.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5749 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2003-03-19 20:56:46 +00:00
parent 52e20b0977
commit 186a1f71e6
3 changed files with 54 additions and 48 deletions
+2 -2
View File
@@ -25,8 +25,8 @@ public:
BytecodeWriter(std::deque<unsigned char> &o, const Module *M);
protected:
void outputConstants(bool isMethod);
void processMethod(const Function *F);
void outputConstants(bool isFunction);
void outputFunction(const Function *F);
void processBasicBlock(const BasicBlock &BB);
void processInstruction(const Instruction &I);