<div>
                    Hello Tomas,<div><br></div><div>I'm a little bit new here too, but I guess I could try to help you. First, let me see if I get your project straight: you are writing a tool that should (let's say) help students to identify what does a loop seems like after a chosen transformation. Is that the case? If so, your first objective would be isolating a loop transformation and avoid other transformations to mess up with the transformed loop, right?</div><div><br></div><div>Well, as far as I know, every analysis and transformation in LLVM is a Pass. If you want to see which passes and the order that they were called, you could pass <span style="font-family: Menlo; font-size: 11px; ">--debug-pass=Structure</span> when using opt, and the PassManager will print the call list for you.</div><div><br></div><div>If you want only one transformation to be called, you could disable in opt all analysis and transformations (I guess -o0 is the default), and enable only the ones that you are interested in (something like -transform1 -transform2 etc.). Keep in mind that the transformations could need different types of analysis (that will be also printed by the PassManager), and, sometimes, should be interesting for a transformation the combination of it with another transformations that only will clean up the code (such as dead code elimination, for example). For a list of all passes available in LLVM, please check <a href="http://llvm.org/docs/Passes.html" style="color: rgb(0, 106, 227); ">http://llvm.org/docs/Passes.html</a>.</div><div><br></div><div>I advise you to have a read in <a href="http://llvm.org/docs/WritingAnLLVMPass.html" style="color: rgb(0, 106, 227); ">http://llvm.org/docs/WritingAnLLVMPass.html</a> too, to get a better idea of how the passes work.</div><div><br></div><div>Hope I could help,</div>
                </div>
                <div><div><br></div><div>-- </div><div>Cristianno Martins</div><div>PhD Student of Computer Science</div><div>University of Campinas</div><div>cmartins@ic.unicamp.br</div><div><br></div></div>
                 
                <p style="color: #A0A0A8;">On Tuesday, 24 de April de 2012 at 18:19, Tomáš Heger wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div><div>Hi everyone!</div><div><br></div><div>I would like to create a tool which would "simulate" several loop </div><div>transformations. It should serve as a part of my bachelor thesis.</div><div><br></div><div>Typical usage of that tool would be this:</div><div>Mark a loop in a source (probably C/C++) file and specify desired </div><div>transformation in a predefined way (for example a special comment or </div><div>something). -> Run the tool on that "crafted" source file. -> Watch the </div><div>result (which should be in an input language or possibly in LLVM IR).</div><div><br></div><div>I know that LLVM can do some of the loop transformations but as far as I </div><div>know it decides itself what transformation (if any) will be done. Or am </div><div>I mistaken? Is it possible to specify which loop is supposed to be </div><div>transformed and how? Is it easily possible to get the (above mentioned) </div><div>mark through the compiler frontend so it would appear in the LLVM IR as </div><div>well? Then maybe I could write my own pass and use the `opt` command to </div><div>run it on the .ll file and watch it before and after the pass. Am I </div><div>mistaken? Is there a better way?</div><div><br></div><div>Do you understand what I want to achieve? Is LLVM suitable for my needs? </div><div>What should I read? Where should I start? What would you advise me?</div><div><br></div><div>Thanks for all your answers and ideas.</div><div><br></div><div>-- </div><div>Regards,</div><div>Tomas Heger</div><div><br></div><div>_______________________________________________</div><div>LLVM Developers mailing list</div><div>LLVMdev@cs.uiuc.edu         <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a></div><div><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a></div></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>