I want some optimization passes on LLVM IR, which I got from Toy example , so I created one optimization pass and run the optimization pass using :
installed/bin/opt -load installed/lib/LLVMOurPass.so -OurPass -enable-new-pm=0 <toy.bc> /dev/null
but it showing the error:
installed/bin/opt: <stdin>:1:1: error: expected top-level entity ELF>`7@8 ^
toy.bc has the following properties:
❯ file toy.bc toy.bc: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, not stripped
Please help !!!