[LLVMdev] Pass registered multiple times!

Lu Zhao luzhao at cs.utah.edu
Mon Mar 31 14:24:21 PDT 2008


> If you disassemble your input bytecode file and look at the LLVM 
> disassembly, I'd bet that either __main() and puts are external 
> functions with no function body or are not present in the file at all.

You're right. The assembly code only has the body of main function and
the external function declaration puts

declare i32 @puts(i8*)

It makes sense, I think, that my derived FunctionPass is not invoked on
external functions when I intend to optimize code such as C. However,
if my code was written in LLVM and I wanted to trigger it on all LLVM
functions including external functions outside the module, how could I
do it?

Thanks.
Lu



More information about the llvm-dev mailing list