Reputation: 13840
I use LLVM opt
to run a pass using, e.g, opt -load libMyPass.so my-pass foo.ll > foo1.ll
.
foo.ll
is an IR file, and I want foo1.ll
to contain the result, of running the pass, in IR format. But foo1.ll
becomes a bitcode file, so I need to issue llvm-dis foo1.ll
to transform it into IR format.
How do I avoid having to run llvm-dis
, and make opt
transform from IR format to IR format?
Upvotes: 3
Views: 1927
Reputation: 4205
opt
has a nice option for doing that:
-S - Write output as LLVM assembly
I guess what confuses you is that LLVM assembly is a synonym for LLVM IR.
Upvotes: 9