Re: Why do intermediate codes have >, >=?

Henry Spencer <henry@zoo.toronto.edu>
13 Jun 1996 20:09:29 -0400

          From comp.compilers

Related articles
Why do intermediate codes have >, >=? alan@ez2.ezlink.com (1996-05-21)
Re: Why do intermediate codes have >, >=? mark@omnifest.uwm.edu (1996-05-25)
Re: Why do intermediate codes have >, >=? henry@zoo.toronto.edu (Henry Spencer) (1996-06-13)
Re: Why do intermediate codes have >, >=? cwf@research.bell-labs.com (Chris Fraser) (1996-06-21)
| List of all articles for this month |

From: Henry Spencer <henry@zoo.toronto.edu>
Newsgroups: comp.compilers
Date: 13 Jun 1996 20:09:29 -0400
Organization: SP Systems, Toronto
References: 96-05-144
Keywords: optimize

alan@ez2.ezlink.com (Alan L. Wendt) writes:
>Can anyone give me a reason why intermediate codes for compilers
>such as gcc or lcc need (or want) the > and >= operators? Would
>not the code generator want to generate the same code for exp1 < exp2
>and exp2 > exp1?


If the subexpressions involve side effects, the two forms are not
equivalent. Depending on the language, there may well be promises about
evaluation order which cannot be blithely discarded.
--
Henry Spencer, henry@zoo.toronto.edu
--


Post a followup to this message

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