DFG?

Hello, I’m going to need something like a DFG of a loop. I’ve been studying the ScalarEvolution analysis and it performs many of the functions I need (it’s something like a DFG, going recursively backwards), but I need something that indicates me when a instruction has to be before another, or can be switched. As I said in a previously message, my idea is to match the instructions inside a loop in LUT, so before synthesizing, I have to decide which instructions go to each LUT.

By the way, to know if a variable inside the loop is used out, and the loop is in LCSSA form, it’s as simple as to verify that in the exit blocks the variable isn’t used in a phi node?

Best regards.
Julio