Problem getting LoopInfo inside non-LoopPass

Thanks for the info. Curious, do you know if there is an opt that will put all loops, including nested ones, in functions (ie each loop in it’s own function)? What I’m trying to do is create a way for each loop to have only one exit. I want all loops to be single exit loops?

I can write my own pass but I’d rather not. I think that if I can put each loop into it’s own function then call merge return that might do it. Ideas?

So it seems that Polly has what I am looking for but when installing, the polly-test is unable to see libisl.so.8 even though it’s installed. I’ve set all the paths correctly according to their website. I realize they have their own mailing list but figured someone here might know also.