Query on 'CodeExtractor'

Hi,

I’m implement a pass which identify some loops and extract them to a function.

Tried to use CodeExtractor to extract loop into a newer function.

For top level loop it works perfectly but for inner loop, it creates trouble just after CodeExtractor when outer loop verification happens.

As newer function call site(‘codeReplacer’) block, is not registered/added to outer loop.

Loop verification aborts with “Loop block has no in-loop successors!”.

i.e: