This patch made a minor refactor of LoopCoalescing.cpp's walkLoops templated method and placed it in Affine's LoopUtils.cpp/h.
This method is also renamed as coalescePerfectlyNestedLoops method. This minor change enables this method to be invoked
by both the original LoopCoalescing pass as well as the newly introduced loop.coalesce transform op.
The loop.coalesce transform op has the ability to coalesce affine, and scf loop nests, leveraging existing LoopCoalescing
mechanism. I have created it inside the SCFTransformOps.td instead of AffineTransformOps.td as it feels to be similar
in spirit as the loop.unroll op that can handle both scf and affine loops. Please let me know if you feel that this op
should be moved into AffineTransformOps.td instead.
The testcase added illustrates loop.coalesce transform op working for scf, affine loops (inner, outer) as well as
coalesced loop can be further unrolled (achieving composibility).
This won't work without explicitly listing available specializations as extern. Or moving the body of the function template to the header.