Why do intermediate codes have >, >=?

alan@ez2.ezlink.com (Alan L. Wendt)
21 May 1996 17:45:23 -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: alan@ez2.ezlink.com (Alan L. Wendt)
Newsgroups: comp.compilers
Date: 21 May 1996 17:45:23 -0400
Organization: EZLink Internet Access Fort Collins Colorado
Keywords: optimize, question

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 so, the easiest way to guarantee this is to
ditch > and >=.


Alan Wendt
[My guess: most computers have asymmetric compare instructions, e.g. compare
a register to memory, so you need all the possible comparisons to generate
good code. -John]


--


Post a followup to this message

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