<div dir="ltr">Hi, I have written a pass and get a psss.so file. My pass optimization relies on some of my own target files.<div>This is how I use them when there is only one source file.</div><div><br><div>For example:</div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>Pass: <b>Hello-pass.so</b></div><div>The dependent object file:  <b>units.o</b> and <b>helper.o</b><br></div></blockquote></div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>Target file: <b>simple.c</b></div><div><b><br></b></div></blockquote></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>I'm using the following command.</div></div><div><br></div><div>>>></div>>>>  <b>/usr/local/bin/clang  -emit-llvm -c  -o obj/simple.bc simple.c</b><br>>>> 

<b>/usr/local/bin/llvm-link obj/simple.bc ./units.o ./helper.o > obj/simple-link.bc
</b><br>
>>>  <b>/usr/local/bin/opt -load ../Hello-pass.so  -O3 < obj/simple-link.bc > obj/simple-opt.bc
</b><br>
>>>  <b>/usr/local/bin/clang  -o obj/simple obj/simple-opt.bc -g -O3</b><br><div>>>></div><div><br></div></blockquote>Now, I need to optimize a large project with my pass and object file(Hello-pass.so units.o and helper.o),such as "md5sum" project.<div>It needs to be compiled and installed using the following command:</div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>>>></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>>>> <b> ./configure</b></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>>>> <b> make</b></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>>>><b>  make install</b></div><div>>>></div><div><br></div></blockquote>I need use LLVM to compile and optimize it.  How can I apply my pass to the entire program?</div><div>What should I do? Please tell me an easy way.</div><div><br></div><div>Please help me!</div><div>Thank you!</div></div>