Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: noalias and vectors Message-ID: <7088@brl-smoke.ARPA> Date: 14 Jan 88 11:26:43 GMT References: <2942@hall.cray.com> <531@cresswell.quintus.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 19 Keywords: noalias, auto-vectorizing In article <531@cresswell.quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: >His statement that a "safe" vectorising compiler currently finds exactly >three safe places in "all the system software" is the kind of evidence I >was asking for that noalias would be useful. No, it's no such thing! That's three places where "noalias" was NOT necessary in order to vectorize. Because he didn't HAVE "noalias", he couldn't vectorize anywhere else. He didn't tally the missed opportunities! >The original programmer may well understand his algorithm well enough >to know where a 'noalias' is safe and where it isn't. But the >maintainer may not. The appearance of "noalias" in interface specifications is a powerful aid. It lets you know that a function is not designed to be safely used in alias situations. For example, it warns that strcpy() must not be used to copy a string into an overlapping portion of the same char array.