8051 >> HI-TECH C PRO for the Silicon Labs 8051 MCU Family

Pages: 1
ganesh
Beta Tester


Reged: Jan 13 2008
Posts: 5
Loc: Tamilnadu, India
Why does constant propagation optimization depend upon the usage of variable
      #63942 - Fri Jul 04 2008 05:52 AM Attachment (58 downloads)

The attached 'testConstantPropagationForGlobalVariablesModifiedInTwoFunctions.c' was derived from ocg-test.c downloaded from http://www.htsoft.com/Files/ocg-test.c

'testConstantPropagationForGlobalVariablesModifiedInTwoFunctions.c' was compiled using the command line options --chip=8051 --opt=all -S

On analyzing the output file 'testConstantPropagationForGlobalVariablesModifiedInTwoFunctions.as' we found that, global variables containing constant value, which have usage/ definition in another function, are not propagated to its references used in an expression.

Query: Why does constant propagation optimization depend upon the usage of variable?


Post Extras: Print Post   Remind Me!   Notify Moderator  
clydeAdministrator
HI-TECH team member
*****

Reged: Oct 16 2003
Posts: 633
Re: Why does constant propagation optimization depend upon the usage of variable [Re: ganesh]
      #64102 - Sun Jul 06 2008 08:30 AM

We don't want to give away all our secrets!

Post Extras: Print Post   Remind Me!   Notify Moderator  
harrymc



Reged: Oct 04 2004
Posts: 4
Loc: Perth, Western Australia
Re: Why does constant propagation optimization depend upon the usage of variable [Re: clyde]
      #64342 - Mon Jul 07 2008 08:08 AM

hehe

Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
1 registered and 0 anonymous users are browsing this forum.

Moderator:  Andrew L, clyde, Brent W, jeff, dave g, meisty, josh stevo 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 837

Rate this topic

Jump to

Contact Us | Privacy statement HI-TECH Software

Powered by UBB.threads™ 6.5.5