Add the switch -polly-debug-func to define the name of a debug function. This function is ignored for any validity check.
Its purpose is to allow to observe a value after transformation by a SCoP, and to follow which statements are executed in which order. For instance, consider the following code:
static void dbg_printf(int sum, int i) { fprintf(stderr, "The value of sum is %d, i=%d\n", sum, i); fflush(stderr); } void func(int n) { int sum = 0; for (int i = 0; i < 16; i+=1) { sum += i; dbg_printf(sum, i); } }
Executing this after Polly's codegen reveals the new execution order and the assumed values at that point of execution.