[llvm-dev] How can pass be used to optimize a project?
y liu via llvm-dev
llvm-dev at lists.llvm.org
Wed Apr 15 06:02:58 PDT 2020
Hi, I have written a pass and get a psss.so file. My pass optimization
relies on some of my own target files.
This is how I use them when there is only one source file.
The dependent object file: *units.o* and *helper.o*
Target file: *simple.c*
I'm using the following command.
>>> */usr/local/bin/clang -emit-llvm -c -o obj/simple.bc simple.c*
>>> */usr/local/bin/llvm-link obj/simple.bc ./units.o ./helper.o >
>>> */usr/local/bin/opt -load ../Hello-pass.so -O3 < obj/simple-link.bc >
>>> */usr/local/bin/clang -o obj/simple obj/simple-opt.bc -g -O3*
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.
It needs to be compiled and installed using the following command:
>>> * ./configure*
>>> * make*
>>>* make install*
I need use LLVM to compile and optimize it. How can I apply my pass to the
What should I do? Please tell me an easy way.
Please help me!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev