Description of the Project: Developers often use compiler generated remarks and analysis reports to optimize their code. While compilers in general are good at including source code positions (i.e., line and column numbers) in the generated messages, it is useful if these generated messages also include the corresponding source-level expressions. LLVM implementation uses a small set of intrinsic functions to define a mapping between LLVM program objects and the source-level expressions. The goal of this project is to use the information included within these intrinsic functions to either generate the source expression corresponding to LLVM values or to propose and implement solutions to get the same if the existing information is insufficient. Optimizing memory accesses in a program is important for application performance. We specifically intend to use compiler analysis messages that report source-level memory accesses corresponding to the LLVM load/store pointer values that inhibit compiler optimizations. As an example, we can use this information to report memory access dependences that inhibit vectorization.
Expected result: Provide an interface which takes an LLVM value at any point in the LLVM transformations pipeline and returns a string corresponding to the equivalent source-level expression. We are especially interested in using this interface to map addresses used in load/store instructions to equivalent source-level memory references.
Desirable skills: Intermediate C++, familiarity with LLVM core or willingness to learn the same, self-motivation.
Project size: Medium
Confirmed Mentor(s): @sguggill Karthik Senthil