Manipulating LLVM IR Code

Hi,

I want to delete instructions from LLVM IR code through programs. Then I want to write the modified code to another .bc/.ll file. Any idea on how to do this?

Regards,

Ansar K.A.

Hi,

This is basically what any pass driven through opt is doing. Have you tried http://llvm.org/docs/WritingAnLLVMPass.html ?

Best,

Hi,

Thanks for notifying “opt”. Found the solution.