Hi
I would like to ask if issue described in chapter 5.1.2 in spra666.pdf is still valid for compiler 6.1.11. I know there is some improvements from Readme.txt. Assuming in additional -mt and -O3 in compiler option.
--------------------------------------------------------------------------------------------------
(...)
The compiler will now utilize the restrict keyword when it is applied to:
- all pointer variables, including globals, function parameters, and
variables with any scope, including block scope,
- by-reference function parameters,
- arrays of pointers or structs, and
- class or structure pointer members.
-------------------------------------------------------------------------------------------------
Seems enough clear that: Yes. So apologise for obvious question, I would like to be sure and get some feedback from TI's smart guy/girl or users.
I quote this functions below.
===========================================================
LoopWithStructs(myStr * restrict s)
{
int i;
#pragma MUST_ITERATE(2,,2)
for (i=0; i<s->data->sz; i++)
s->data->q[i] = s->data->p[i];
}
and
LoopWithStructs(myStr * restrict s)
{
int i;
int * restrict p = s->data->p;
int * restrict q = s->data->q;
int sz = s->data->sz;
#pragma MUST_ITERATE(2,,2)
for (i=0; i<sz; i++)
q[i] = p[i];
}
===========================================================
Kind Regards
/Greg