[LLVMdev] store the LLVM-bitcode from a pass

Martin Süßkraut martin.suesskraut at googlemail.com
Fri Mar 13 09:04:04 PDT 2009


On Fri, Mar 13, 2009 at 14:52, RAAD B <raad_7007 at yahoo.com> wrote:
> These are the contents of the generated file.
>
>
>
> Start >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> ; ModuleID = '<stdin>'
> target datalayout =
> "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
> target triple = "i386-pc-linux-gnu"
> @.str = internal constant [12 x i8] c"hello world\00"        ; <[12 x i8]*>
> [#uses=1]
>
> define i32 @main() {
> entry:
>     call void (...)* @jLLVMAnnotation(i32 2)
>     call void (...)* @jLLVMAnnotation(i32 3, i32 4)
>     %0 = tail call i32 @puts(i8* getelementptr ([12 x i8]* @.str, i32 0, i32
> 0))        ; <i32> [#uses=0]
>     ret i32 0
> }
>
> declare i32 @puts(i8*)
>
> define void @jLLVMAnnotation(...) {
> fncEntry:
>     ret void
> }
> BCÀÞ!          #AÈI29%bEBB28I
> 2D$H
> !#Dr!
>
> d  Q      2"     e &DH    &DÆBB&90 $£¥##@ÁF J E ©   ¢t<°6qhvHw¨|hspzØPåÐð s
> z0r s mq x xÐézzmq`zv q`ms z0r s mv at z0r v at m`s z0r s m`v at z0r v at m`v at z`t v at m`q
> x q x q xÐá z z`tÐæp s z0r ó@2B 3$          $    Àd      È      2L
> &GÆC:]Ðe6û
> º¿ål2 S"      A,      # EP…@2A  c 0c 0ÇXá@    PÍa      a      Á…
> à5S       q      @0 ÒØÀåkjMãLÀ8¾4E&@<Ô$
>
> End  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Are dumping out something in your pass? If yes, use opt's "-o" options
(optionally -f see "opt -help") instead of a redirection ">".

Bye,
    Martin
-- 
Martin Süßkraut
Dresden University of Technology,
Computer Science Department
Systems Engineering Group
Dresden, Germany
http://wwwse.inf.tu-dresden.de




More information about the llvm-dev mailing list