Abstract When compiling for parallel machines, it is often necessary to generate a loop nest to scan a region of index points in lexicographic order. One well-known application example is the use of loop transformations to restructure loop nests. Previous work shows how to generate code to scan a convex polyhedron (possibly intersected with a lattice), a region derived from an application of a non-singular transformation to a convex iteration space. The driving force behind this work is to investigate how to generate code for non-singular transformations of nested loops with non-convex iteration spaces. The final result is a method that generates code for a union of convex polyhedra, possibly intersected with a lattice. Two other applications that are discussed include generation of data transfer code for machines with a hierarchical memory and construction of SPMD programs for distributed memory parallel machines.