| To: | stuart@xxxxxxxxx, pro64-support@xxxxxxxxxxx |
|---|---|
| Subject: | Re: unoptimized dead store |
| From: | Jim Kingdon <jkingdon@xxxxxxxxxxxxxxxxxxxx> |
| Date: | Wed, 09 May 2001 13:09:02 -0700 |
| References: | <200105091937.MAA16065@scv3.apple.com> |
| Sender: | owner-pro64-support@xxxxxxxxxxx |
Looks interprocedural to me. The optimization
is only possible if the compiler knows that
the "glarp" function does not modify "a".
(Look up "alias" in a compiler text, "restrict"
in C99, similar rules for Fortran, &c).
stuart@xxxxxxxxx wrote:
> Clueless newbie here.
>
> Here's my test program:
> ----------------------
> int a, b ;
>
> main( int xx)
> {
> a = 2 ;
> glarp( xx) ;
> a++ ;
> return a + b ;
> }
> glarp( int j)
> {
> extern int a ;
>
> if (j < 10)
> bling( j-1) ;
> }
>
> bling( int k)
> {
> extern int b ;
>
> b = k ;
> }
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | unoptimized dead store, stuart |
|---|---|
| Next by Date: | RE: unoptimized dead store, Chan, Sun C |
| Previous by Thread: | unoptimized dead store, stuart |
| Next by Thread: | Re: unoptimized dead store, Robert Kennedy |
| Indexes: | [Date] [Thread] [Top] [All Lists] |