Muhui Jiang via llvm-dev
2018-Aug-09 06:16 UTC
[llvm-dev] LLVM Pass in compiling and linking
Hi According to the official documentation. It says to use the tool opt -load to run LLVM pass on the target bitcode. According to my observation. When the program is very large, it is very slow and not efficient. I noticed that LLVM support to run LLVM pass during the compiling time or linking time. For compiling time. It seems that the option -Xclang -load -Xclang mypass.so will work. However, after generating the object. the ld linker will say that it has no option -load. Thus aborted. What can I do? I just want to write a LLVM pass and run it during the compiling time. No documentation is found. Could anyone tell me or give me some help? Many Thanks Regards Muhui -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180809/ddfaf41d/attachment.html>
mayuyu.io via llvm-dev
2018-Aug-09 06:18 UTC
[llvm-dev] LLVM Pass in compiling and linking
Modify lib/Transforms/IPO/PassManagerBuilder.cpp to statically link and run your pass Zhang> 在 2018年8月9日,14:16,Muhui Jiang via llvm-dev <llvm-dev at lists.llvm.org> 写道: > > Hi > > According to the official documentation. It says to use the tool opt -load to run LLVM pass on the target bitcode. > > According to my observation. When the program is very large, it is very slow and not efficient. I noticed that LLVM support to run LLVM pass during the compiling time or linking time. > > For compiling time. It seems that the option -Xclang -load -Xclang mypass.so will work. However, after generating the object. the ld linker will say that it has no option -load. Thus aborted. > > What can I do? I just want to write a LLVM pass and run it during the compiling time. No documentation is found. Could anyone tell me or give me some help? Many Thanks > > Regards > Muhui > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev