SPRUIG8J January 2018 – March 2024
In order to better facilitate nested loop coalescing, in which an outer loop level containing instructions is merged into an inner loop level, the C7000 architecture provides a feature known as the Nested Loop Controller (NLC). This feature implements hardware loop control for no more than one level of loop nesting. This allows the compiler to coalesce loop levels while predicating the execution of outer loop instructions in the inner loop. This reduces loop control overhead and provides for better function unit resource utilization for software pipelined loops. Loop coalescing is something that the compiler attempts to do automatically if the operation is both legal and profitable. Profitability is determined by a heuristic.
There are two pragmas that allow you to explicitly enable or disable coalescing of specific nested loops. These pragmas can only be applied to loops and must appear immediately before a loop construct in C/C++:
#pragma COALESCE_LOOP
#pragma NO_COALESCE LOOP