May 2015
Intermediate to advanced
296 pages
5h 10m
English
In this recipe, you will learn to generate LLVM bit code from IR. The LLVM bit code file format (also known as bytecode) is actually two things: a bitstream container format and an encoding of LLVM IR into the container format.
The llvm-as tool must be installed in the PATH.
Do the following steps:
llvm-as:$ cat test.ll define i32 @mult(i32 %a, i32 %b) #0 { %1 = mul nsw i32 %a, %b ret i32 %1 }
test.ll to bitcode format, you need to use the following command:
llvm-as test.ll –o test.bc
test.bc file, which is in bit stream format; so, when we want to have a look at output in text format, ...Read now
Unlock full access