SelectionDAG, loops

Hi,

I am trying to rewrite loop addressing to suit my target. I wonder if there is a simple way to find out if the current SelectionDAG is a loop-body?

I tried to rewrite LLVM code to do address arithmetic, ie %nextaddr = add i16* %curraddr, 4, but I could not find a way to make this work.

thanks,

Jonas

Hi Jonas,

I’m not sure exactly what you’re doing here, but it sounds like what the LoopStrengthReduction pass does. To get it to work for your target you need to implement the TargetLoweringInfo hooks that it uses.

-Chris