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

Peter Flass <Peter_Flass@Yahoo.com>
Fri, 17 Aug 2007 18:02:08 -0400

          From comp.compilers

Related articles
[6 earlier articles]
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)
Re: Vector assignment semantics (was Re: latest trends in compiler opt tom@kednos.company (Tom Linden) (2007-08-26)
Re: Vector assignment semantics (was Re: latest trends in compiler opt gah@ugcs.caltech.edu (glen herrmannsfeldt) (2007-08-29)
Re: Vector assignment semantics (was Re: latest trends in compiler opt tom@kednos.company (Tom Linden) (2007-09-11)
| List of all articles for this month |

From: Peter Flass <Peter_Flass@Yahoo.com>
Newsgroups: comp.compilers,comp.lang.pl1
Date: Fri, 17 Aug 2007 18:02:08 -0400
Organization: Road Runner High Speed Online http://www.rr.com
References: 07-08-01607-08-021 07-08-024 07-08-034 07-08-037 07-08-040 07-08-041 07-08-044
Keywords: PL/I
Posted-Date: 18 Aug 2007 09:32:28 EDT

Brooks Moses wrote:


> 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.) ...


Thanks for the reply. I guess I'll have to dig out the standard and
see how it actually reads. Given the choice, however, I'm going for
compatibility with the IBM compilers, even for things that are
"undefined" since there's always someone who has written code that
depends on a specific behavior.


[I dug out my copy of the 1976 PL/I standard, and I can't figure out
whether it has parallel or serial semantics, although sec 1.2.1.4 (3)
does say that an expression may be evaluated in any order. So perhaps
it has neither. -John]



Post a followup to this message

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