search for: qrestrict

Displaying 2 results from an estimated 2 matches for "qrestrict".

Did you mean: restrict
2019 Jan 15
4
Aggressive optimization opportunity
...will treat all function pointer parameters as restrict one. int foo(int * a) + restrict_args opt equals to: int foo(int * restrict a) Here is a complete example: source code: extern int num; int foo(int * a) { (*a) = 10; num++; (*a)++; return *a; } Using IBM xlc compiler with option -qrestrict at -O2, we get result: 0000000000000000 <foo>: 0: 00 00 4c 3c addis r2,r12,0 4: 00 00 42 38 addi r2,r2,0 8: 00 00 a2 3c addis r5,r2,0 c: 00 00 a5 e8 ld r5,0(r5) 10: 0b 00 00 38 li r0,11 14: 00 00 03 90 stw r0,0(r3) 18...
2019 Jan 15
3
Aggressive optimization opportunity
...bled by default otherwise, but can be toggled independently. -Hal int foo(int * a) + restrict_args opt equals to: int foo(int * restrict a) Here is a complete example: source code: extern int num; int foo(int * a) { (*a) = 10; num++; (*a)++; return *a; } Using IBM xlc compiler with option -qrestrict at -O2, we get result: 0000000000000000 <foo>: 0: 00 00 4c 3c addis r2,r12,0 4: 00 00 42 38 addi r2,r2,0 8: 00 00 a2 3c addis r5,r2,0 c: 00 00 a5 e8 ld r5,0(r5) 10: 0b 00 00 38 li r0,11 14: 00 00 03 90 stw r0,0(r3) 18: 00 00 85 80 lwz r4,0(r5) 1c: 0b 00 60 38 li r3,11 ------>since we conf...