[LLVMdev] loop transformation: uniquely identifying a loop within a program

Tatenda M. Chipeperekwa tatenda at cs.ucsd.edu
Thu Nov 10 02:39:35 PST 2011


hi all,

We are writing a loop transformation using the llvm loop pass class, but we
do not want to run the pass on all loops within a program. We are looking
for suggestions on how we can uniquely identify certain loops that we want
to transform. So far, we are working on a suggestion to transform the loops
depending on which function they're run from in the program. Which will be
something like this:

   ...
   Function *F = L -> getParent() -> getParent();
...
   if(F->getName == "my_function") {
   //transform loops in my_function
   }

The function name can easily be passed in from the command line and this
would work fine for loops within that function only. But how can we extend
this for nested loops for example?

Thank you,

tatenda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111110/ef8aaaa3/attachment.html>


More information about the llvm-dev mailing list