|optimizing address calculation? email@example.com (2007-09-18)|
|Re: optimizing address calculation? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-09-18)|
|Re: optimizing address calculation? firstname.lastname@example.org (2007-09-24)|
|Re: optimizing address calculation? alexc@TheWorld.com (Alex Colvin) (2007-09-24)|
|Re: optimizing address calculation? email@example.com (2007-09-25)|
|From:||Alex Colvin <alexc@TheWorld.com>|
|Date:||Mon, 24 Sep 2007 20:42:05 +0000 (UTC)|
|Organization:||The World : www.TheWorld.com : Since 1989|
|Posted-Date:||24 Sep 2007 21:48:41 EDT|
>in the program, I refer to the variable test2a by the pointer
>for(i = 0; i <20; i++)
> pTest2a->test1a[x].b[i] = i;
>Although in the loop pTest2a->test1a[x] is fixed, it seems the
>generated codes calculate
>the address from pTest2a. If it is changed to the following:
Any code take the address of pTest2a, or make it external? Perhaps the
compiler is afraid that the loop assignment might also change pTest2a, in
which case it needs the addresses need to be recalculated.
Try making it a const, or at least static.
mac the naof
Return to the
Search the comp.compilers archives again.