Following is the list tasks which have been completed: 1. Learning LLVM IR language and LLVM tools A study of LLVM IR as done to understand the syntax and constructs available in LLVM IR. We also studied and used the following LLVM tools, llvm-gcc : This is a complete C compiler which uses LLVM tools. This tool was used with -emit-llvm option to generate LLVM IR. This gave an understanding of how source language constructs are mapped into LLVM IR. llc : This tool converts LLVM IR to native assembly language. This tool helped us verify and understand how operations on vectors (e.g. %3 = fmul <4xdouble> %1, %2) in LLVM IR get converted to native vector instructions if available. lli : This tool is LLVM IR interpreter, which is used for running and testing the LLVM byte code generated by our frond-end. 2. Building front-end for pseudo language Code generation of front-end for pseudo language is completely done. Testing of this part is in progress, following is the test report,
Now that we have built a basic compiler for the pseudo language we can start with auto vectorization to identify and convert parallel operations into vector operations. A project under development in LLVM called Polly makes use of polyhedral model to represent loop structures and perform transformation. This project does perform dependency analysis on loop statements. Specifying –lda flag to the optimizer creates the dependency related structures for the loops in the code. So we have 2 options here, either we can use their dependence analysis and further perform auto-vectorization or we can implement dependence analysis and auto vectorization at the pseudo language level. Option 1: Advantage is that dependence analysis is performed in a comprehensive way; we only need to use their analysis for vectorization. But this option has the disadvantage that we have to work at LLVM IR level which makes things more complicated. Option 2: This has the advantage that we need to work with pseudo language level which is quite simple, but we have to implement dependence analysis all by ourselves. Deciding on the right option is crucial and we have to choose between them in a day or two, before we can make any progress. Work Distribution The task were broken into subtasks and distributed as follows:
|
||||||||||||||||||||||||||||||||||||||||||||||||||