|optimizing address calculation? firstname.lastname@example.org (2007-09-18)|
|Re: optimizing address calculation? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-09-18)|
|Re: optimizing address calculation? email@example.com (2007-09-24)|
|Re: optimizing address calculation? alexc@TheWorld.com (Alex Colvin) (2007-09-24)|
|Re: optimizing address calculation? firstname.lastname@example.org (2007-09-25)|
|From:||Hans-Peter Diettrich <DrDiettrich1@aol.com>|
|Date:||Tue, 18 Sep 2007 16:53:03 +0200|
|Posted-Date:||19 Sep 2007 15:55:58 EDT|
> in the program, I refer to the variable test2a by the pointer
> for example
> 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.
Perhaps the compiler couldn't figure out, how x and i are related to
the loop (invariant, loop index, side effects...).
That's why e.g. Pascal doesn't allow to modify the loop index variable
inside the loop, so that the compiler can safely optimize all for
Return to the
Search the comp.compilers archives again.