From e9ef4573e28dfae9949da574b135e72652f79b24 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 12 May 2007 03:23:40 +0000 Subject: [PATCH] first step git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37001 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/BitCodeFormat.html | 124 +++++++++++++++++++++++++++++++--------- 1 file changed, 97 insertions(+), 27 deletions(-) diff --git a/docs/BitCodeFormat.html b/docs/BitCodeFormat.html index 0579a42115e..949de946982 100644 --- a/docs/BitCodeFormat.html +++ b/docs/BitCodeFormat.html @@ -4,56 +4,126 @@ LLVM Bitcode File Format -
LLVM Bitcode File Format
  1. Abstract
  2. -
  3. Concepts
  4. +
  5. Overview
  6. +
  7. Bitstream Format +
      +
    1. Magic Numbers
    2. +
    +
  8. +
  9. LLVM IR Encoding
-

Written by Reid Spencer and - Chris Lattner. +

Written by Chris Lattner.

+ -
Abstract
+
Abstract
+
-

This document describes the LLVM bitcode file format. It specifies -the binary encoding rules of the bitcode file format so that -equivalent systems can encode bitcode files correctly. The LLVM -bitcode representation is used to store the intermediate -representation on disk in a compacted form.

-

This document supercedes the LLVM bytecode file format for the 2.0 -release.

+ +

This document describes the LLVM bitstream file format and the encoding of +the LLVM IR into it.

+
+ -
Concepts
+
Overview
+
-

This section describes the general concepts of the bitcode file -format without getting into specific layout details. It is recommended -that you read this section thoroughly before interpreting the detailed -descriptions.

+ +

+What is commonly known as the LLVM bitcode file format (also, sometimes +anachronistically known as bytecode) is actually two things: a bitstream container format +and an encoding of LLVM IR into the container format.

+ +

+The bitstream format is an abstract encoding of structured data, like very +similar to XML in some ways. Like XML, bitstream files contain tags, and nested +structures, and you can parse the file without having to understand the tags. +Unlike XML, the bitstream format is a binary encoding, and unlike XML it +provides a mechanism for the file to self-describe "abbreviations", which are +effectively size optimizations for the content.

+ +

This document first describes the LLVM bitstream format, then describes the +record structure used by LLVM IR files. +

+ +
+ + +
Bitstream Format
+ + +
+ +

+The bitstream format is literally a stream of bits, with a very simple +structure. This structure consists of the following concepts: +

+ + + +

Note that the llvm-bcanalyzer tool can be +used to dump and inspect arbitrary bitstreams, which is very useful for +understanding the encoding.

+ +
+ + +
Magic Numbers +
+ +
+ +

LLVM

+ +
+ + + +
Well-Formedness
+ +
+ +

blah +

+ +
+ + +
LLVM IR Encoding
+ + +
+ +

+
+ +
Valid CSS! Valid HTML 4.01! -Reid Spencer and Chris Lattner
+ Chris Lattner
The LLVM Compiler Infrastructure
Last modified: $Date$
-- 2.34.1