Visible to Intel only — GUID: fct1573327563245
Ixiasoft
Visible to Intel only — GUID: fct1573327563245
Ixiasoft
3.2. Avoid Pointer Aliasing
Add a restrict type qualifier to pointer types whenever possible. By having restrict-qualified pointers, you prevent the Intel® HLS Compiler Standard Edition from creating unnecessary memory dependencies between nonconflicting read and write operations.
The restrict type qualifier is restrict.
Consider a loop where each iteration reads data from one array, and then it writes data to another array in the same physical memory. Without adding the restrict type qualifier to these pointer arguments, the compiler must assume that the two arrays overlap. Therefore, the compiler must keep the original order of memory accesses to both arrays, resulting in poor loop optimization or even failure to pipeline the loop that contains the memory accesses.
<quartus_installdir>/hls/examples/tutorials/best_practices/parameter_aliasing