Re: Pros and cons of high-level intermediate languages

diamond@jit.dec.com (Norman Diamond)
Mon, 10 Aug 1992 15:43:48 GMT

          From comp.compilers

Related articles
[27 earlier articles]
Re: Pros and cons of high-level intermediate languages optima!kwalker@cs.arizona.edu (1992-08-04)
Re: Pros and cons of high-level intermediate languages chased@rbbb.Eng.Sun.COM (1992-08-04)
Re: Pros and cons of high-level intermediate languages nfsun!gchamber@uunet.UU.NET (1992-08-04)
Re: Pros and cons of high-level intermediate languages moss@cs.umass.edu (1992-08-05)
Re: Pros and cons of high-level intermediate languages chased@rbbb.Eng.Sun.COM (1992-08-07)
Re: Pros and cons of high-level intermediate languages maniattb@cs.rpi.edu (1992-08-07)
Re: Pros and cons of high-level intermediate languages diamond@jit.dec.com (1992-08-10)
Re: Garbage collectable C chased@rbbb.Eng.Sun.COM (1992-08-10)
| List of all articles for this month |

Newsgroups: comp.compilers
From: diamond@jit.dec.com (Norman Diamond)
Organization: Compilers Central
Date: Mon, 10 Aug 1992 15:43:48 GMT

nfsun!gchamber@uunet.UU.NET (Glenn Chambers) writes:
>[one could force references to GC-able pointers with]


> extern volatile void * __gc_sink;
> #define _GC_USE(x) __gc_sink = (void *) (x)


>[and in an assembler post-pass remove the dead code thereby generated]
>The way that we (Hans Boehm and I) see this going wrong is if "x" is
>reconstituted (say, from other induction variables) at the _GC_USE.


I think the following code might be safer plus avoid some of the register
pressure. A post-pass over the assembly language is still needed to
remove the unnecessary fetches (or other implementation-defined access to
volatiles). Of course, if the translator to C declares register x, then
this doesn't work.


      #define _GC_USE(x) *(volatile void *)&x;


--
Norman Diamond diamond@jit081.enet.dec.com
--


Post a followup to this message

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