This method returns whether a block is nested inside of a loop. There
can be two kinds of loop:
- The block is nested inside of a LoopLikeOpInterface
- There is a cycle in the control flow graph
This will be useful for Flang's stack arrays pass, which moves array
allocations from the heap to the stack. Special handling is needed when
allocations occur inside of loops to ensure additional stack space is
not allocated on each loop iteration.