This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler: Has TI ever employed any LLVM-based cross-compiler frame work?

Tool/software: TI C/C++ Compiler

Has TI ever employed any LLVM-based cross-compiler frame work? Since I may need some LLVM-based function level pass to do some instrumentation before the generation of binary code, is that possible to be easily done on any TI prototyping board? 

  • We are exploring the use of LLVM compiler infrastructure in the implementation of TI compilers.  However, not in a way that is useful here.

    Consider using function entry and exit hooks.  You don't say which TI processor family you use.  For the moment, I presume it is ARM.  See the section titled Enabling Entry Hook and Exit Hook Functions in the ARM compiler manual.  

    Another idea to consider ... I understand you can use LLVM compiler infrastructure to create tools which take C code as input, and emit C code as output.  It seems likely you could use that to write your own custom tool that adds the needed instrumentation.

    Thanks and regards,

    -George

  • Thanks George, you precisely got my question. I am using (or at least planning to use ARM-based prototyping board), according to the manual,  the function-hooks are exactly what I need for now.

    But I don't understand your second idea. Normally LLVM-based instrumentation makes use of the internally-defined IR, while the output is usually bitcode (.bc or .ll). Have you seen any existing approach doing a Source-to-Source code instrumentation with LLVM pass? If so could you point me the some link or public available manual? That will be definitely a very helpful framework for me right now. 

    Any suggestions are helpful, thanks.