Re: Vector assignment semantics (was Re: latest trends in compiler optimization research?)

Brooks Moses <bmoses-nospam@cits1.stanford.edu>
Wed, 15 Aug 2007 22:52:27 -0700

          From comp.compilers

Related articles
[3 earlier articles]
Re: latest trends in compiler optimization research? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2007-08-11)
Re: Vector assignment semantics (was Re: latest trends in compiler opt al407@cam.ac.uk (Anton Lokhmotov) (2007-08-13)
Re: Vector assignment semantics (was Re: latest trends in compiler opt gah@ugcs.caltech.edu (glen herrmannsfeldt) (2007-08-15)
Re: Vector assignment semantics (was Re: latest trends in compiler opt Peter_Flass@Yahoo.com (Peter Flass) (2007-08-15)
Re: Vector assignment semantics (was Re: latest trends in compiler opt jwkenne@attglobal.net (John W. Kennedy) (2007-08-15)
Re: Vector assignment semantics (was Re: latest trends in compiler opt wyrmwif@tsoft.org (SM Ryan) (2007-08-16)
Re: Vector assignment semantics (was Re: latest trends in compiler opt bmoses-nospam@cits1.stanford.edu (Brooks Moses) (2007-08-15)
Re: Vector assignment semantics (was Re: latest trends in compiler opt mojaveg@mojaveg.lsan.mdsg-pacwest.com (2007-08-17)
Re: Vector assignment semantics (was Re: latest trends in compiler opt gah@ugcs.caltech.edu (glen herrmannsfeldt) (2007-08-17)
Re: Vector assignment semantics (was Re: latest trends in compiler opt Peter_Flass@Yahoo.com (Peter Flass) (2007-08-17)
Re: Vector assignment semantics (was Re: latest trends in compiler opt jjw@cs.sfu.ca (James J. Weinkam) (2007-08-20)
Re: Vector assignment semantics (was Re: latest trends in compiler opt gah@ugcs.caltech.edu (glen herrmannsfeldt) (2007-08-20)
Re: Vector assignment semantics (was Re: latest trends in compiler opt jvorbrueggen@mediasec.de (=?ISO-8859-1?Q?Jan_Vorbr=FCggen?=) (2007-08-21)
[3 later articles]
| List of all articles for this month |
From: Brooks Moses <bmoses-nospam@cits1.stanford.edu>
Newsgroups: comp.compilers,comp.lang.pl1
Date: Wed, 15 Aug 2007 22:52:27 -0700
Organization: Stanford University
References: 07-08-01607-08-021 07-08-024 07-08-034 07-08-037 07-08-040 07-08-041
Keywords: parallel, PL/I
Posted-Date: 17 Aug 2007 11:53:37 EDT

Peter Flass wrote:
> None yet, but many thanks for the "heads up." I'm not sure I
> understand serial vs. parallel, but if I do understand I wa going to
> do parallel, and create an array temporary to hold the result of the
> expression. Now I don't know what I'll do.


My suggestion (from a language-design standpoint; I don't know if
you're writing from that direction or as a PL/I implementor, since
this is crossposted) would be to do neither. The point of such a
construction is to allow the compiler to make the fastest possible
code. If the language _guarantees_ either serial or parallel
semantics, there will necessarily be cases where the compiler will
have to pessimize the code due to things that it cannot prove are
independent.


Furthermore, if a person _wants_ serial semantics, they can write a
for-loop, and if they want parallel semantics for a case that requires
a temporary, they can write their own array temporary (which means
they won't be surprised by its existence).


Thus, I would recommend that the language standard say that array
assignments where the right-hand side depends on data which is aliased
with the left-hand side are simply illegal code, and in those cases the
result is undefined.


(It may be useful to relax this, and allow the right-hand side for a
given element to depend on data that is aliased with its own left-hand
side element, but not with other elements in the left-hand side.)


Once you've done that, it _might_ be useful to also include a related
syntax for doing things with parallel semantics and generation of
temporaries as necessary. But I think that's of secondary use.


- Brooks


--
The "bmoses-nospam" address is valid; no unmunging needed.



Post a followup to this message

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