hi all,<div><br></div><div>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:
</div><div><br></div><div><div style="color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">   ... </div><div style="color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
   Function *F = L -> getParent() -> getParent();</div><div style="color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><span style="white-space: pre-wrap; ">   ...    </span></div>
<div style="color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">   if(F->getName == "my_function") {</div><div style="color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
<span class="Apple-style-span" style="white-space: pre-wrap;">   //transform loops in my_function</span></div><div style="color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
   }</div><div style="color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><span class="Apple-style-span" style="white-space: pre-wrap;"><br></span></div></div><div style="color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
<span class="Apple-style-span" style="white-space: pre-wrap;">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?</span></div>
<div style="color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><span class="Apple-style-span" style="white-space: pre-wrap;"><br></span></div><div style="color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
<span class="Apple-style-span" style="white-space: pre-wrap;">Thank you,</span></div><div style="color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><span class="Apple-style-span" style="white-space: pre-wrap;"><br>
</span></div><div style="color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><span class="Apple-style-span" style="white-space: pre-wrap;">tatenda</span></div><div>
 </div>