LoopInterchange Pass

Hi,

I developed a Loop Interchange pass. Please take a look.
I have not incorporate data dependence analysis check. I can insert it when the LoopDependenceAnalysis is available.

Thank you
Satya

LoopInterchange.cpp (19.3 KB)

Satya,

The following two lines scare me:

// TODO Perform data dependence analysis for the loop nest.
// TODO Check if there is any data dependence preventing interchange.

It looks like your pass is going ahead and interchanging pairs of loops, without checking for correctness concerns. Is this the case? Have you tested it on, say, the LLVM nightly testsuite?

–Owen