[LLVMdev] Running both Function and Loop passes together

Malveeka Tewari mtewari at eng.ucsd.edu
Wed May 25 01:49:10 PDT 2011


Hi

I want to write a LLVM pass that transforms loops only if they belong to
certain special functions.
Right now I have a pass that can transform loops as I intend, but I do not
know how to check if the loop is actually contained in one of the  special
functions.
Is there a way to identify the function to which a particular loop belongs
 ?

I am not sure if my pass should implement both runOnLoop and runOnFunction
methods or not.
I tried implementing a pass that subclasses both Function and Loop Pass, but
that didn't seem to work.

Any suggestions on the best way to implement such a pass will be extremely
helpful.


Thanks!
Malveeka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110525/383471c6/attachment.html>


More information about the llvm-dev mailing list