Intermediate Representation (Simon)
10 Oct 2001 15:51:45 -0400

          From comp.compilers

Related articles
Intermediate Representation (2001-10-10)
Re: Intermediate Representation (Jon Beniston) (2001-10-12)
Re: Intermediate Representation (2001-10-12)
Intermediate Representation napi@rangkom.MY (1990-08-07)
Re: Intermediate Representation briscoe-duke@CS.YALE.EDU (Duke Briscoe) (1990-08-08)
Re: Intermediate Representation (Preston Briggs) (1990-08-08)
Re: Intermediate Representation (Michael O'Donnell (508)392-2915) (1990-08-09)
[21 later articles]
| List of all articles for this month |

From: (Simon)
Newsgroups: comp.compilers
Date: 10 Oct 2001 15:51:45 -0400
Keywords: design, analysis
Posted-Date: 10 Oct 2001 15:51:45 EDT


I'm not really a compiler man myself, but am trying to understand how
certain things would be represented at the intermediate representation
stage. Could someone please explain to me how a simple loop would be
represented in a [generic] intermediate representation, perhaps
demonstrating the two examples below. Is there infact a difference in
the way the two would be represented at this stage of the compiling
process due to the dependance within the loop?

// Example 1 - No Dependance on Loop Counter

int a = 0;
for(i=0; i<10; i++)
      a = a + 3;

// Example 2 - Uses Loop Counter Value

int a = 0;
for(i=0; i<10; i++)
      a = a + i;

Any references to good explanations available on the web would also be
very useful. Are there any nice [free!] front-end tools about that
will produce a clear and readable intermediate code so I can

Thanks for your time,

Simon ;o)

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.