Hello, I am porting to GCC 4.3.0 for our VLIW processor, and try to utilize improved restrict keyword support. Somehow, I find for normal data types, including vector types up to 8bytes, the restrict keyword works just fine. But for wider vector, such as 4 32-bit word type, the restrict keyword doesn't work any more. For example, for the first two following functions, compiler can unroll (-funroll-all-loops) loops and produces good schedule, where load instructions of next iteration can be moved beyond store instruction of this iteration. But for the third example, it is different. As suggested in .sched2 file, the compiler can only resolve dependence of next load instructions after store instruction of this iteration is scheduled. I tried to print out tree-ssa files by using -fdump-tree-all. Unliked previous GCC (4.2.1), the information in those files is not helpful at all. I don't know where to look at now. Could someone point me some files/functions/data structures by which restrict keyword is used and passed to dependence anaylsis part? Thanks in advance.
Bingfeng Mei Broadcom UK Example code: typedef int V4W __attribute__ ((vector_size (16))); typedef int V2W __attribute__ ((vector_size (8))); void tst(int * restrict a, int * restrict b, int * restrict c) { int i; for(i = 0; i < 256; i++){ c[i] = a[i] + b[i]; } } void tst2(int * restrict a, int * restrict b, int * restrict c) { int i; for(i = 0; i < 256; i++){ c[i] = a[i] + b[i]; } } void tst3(V4W * restrict a, V4W * restrict b, V4W * restrict c) { int i; for(i = 0; i < 256; i++){ c[i] = a[i] + b[i]; } }