[llvm-dev] How to port symcc to clang/llvm-13?

Min-Yih Hsu via llvm-dev llvm-dev at lists.llvm.org
Thu Dec 16 17:11:39 PST 2021


It’s a lot easier to load custom pass plugins into clang with the new PassManager actually:
```
clang -fpass-plugin=<path to plugin> ...
```
Note that <path to plugin> needs to be an absolute path.

-Min

> On Dec 17, 2021, at 6:38 AM, Alberto Barbaro via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Hi all,
> Few days ago I have discovered the symcc[1] project. This project, via an llvm pass, is able to modify the IR code and to inject calls to a backend which allows symbolic execution. I can use it with clang/llvm 11 but not with the version 13. 
> 
> I was wondering if maybe the new pass manager uses llvm passes in a different way .. so I have created a small pass which injects a call to printf in each function and I'm able to use it via opt. Now my question is: is it possible to run the same pass via clang and just obtain the modified IR code? I'd like to avoid to use opt if not mandatory. Is it possible to do it or the new pass manager forces me to use opt?
> 
> How would you fix this situation in symcc?
> 
> If someone could tell me how to load a ModulePass in clang-13 would be great.
> 
> Thanks a lot
> Alberto
> 
> [1] https://github.com/eurecom-s3/symcc <https://github.com/eurecom-s3/symcc>
> 
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211217/c644dbd5/attachment.html>


More information about the llvm-dev mailing list