> Is there any better way to do this? I guess carrying > debug information in LLVM IR might help. But I don't know how > to use the debug information. Please keep in mind that I'm not really clueful in this area, but maybe you need to investigate the debug information to get a relationship between line numbers and basic blocks.