[CLANG] Produce and store LLVM-IR

Dear Clang developers,
I’m Francesco Corti, a Computer Science master student at the University of Pisa. First of all, thanks to all for the work done to maintain the Clang framework.

I would like to ask you a suggestion, for a University project I’m adding to Apache SystemDS the possibility to execute LLVM-IR generated runtime code (named Operator Fusion Plans) in order to speedup some generics AI computations, but in order to do that I need to parse some C++ generated classes, transform them in LLVM-IR, store them while traversing the computational graph and then execute them in the runtime phase.

The job that I have to do is straightforward, however I’m really struggling at connecting the Clang internally classes to parse C++ and produce LLVM Intermediate Representation. Right now I’m just able to parse C++ files and build the AST by calling the method clang::tooling::buildASTFromCode, I would like to ask you if you have any references (manual, code, examples, everything that can be useful) that I could use in order to better understand the Clang C++ library.

Thanks in advance for your time, looking forward to hearing from you.


Francesco Corti