Hi <div><br></div><div>I want to write a LLVM pass that transforms loops only if they belong to certain special functions.</div><div>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.</div>
<div>Is there a way to identify the function to which a particular loop belongs  ? </div><div><br></div><div>I am not sure if my pass should implement both runOnLoop and runOnFunction methods or not.</div><div>I tried implementing a pass that subclasses both Function and Loop Pass, but that didn't seem to work.</div>
<div><br></div><div>Any suggestions on the best way to implement such a pass will be extremely helpful.</div><div><br></div><div><br></div><div>Thanks!</div><div>Malveeka </div>