🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #490

Re: No Aliasing Compile Option

#490
From: Mark ROBERTS
Date: Fri, 25 May 1990 18:37
32 lines
2430 bytes
In article <1913@cod.NOSC.MIL> bmarsh@cod.nosc.mil.UUCP (William C. Marsh) writes:
>In article <265861D7.3293@tct.uucp> chip@tct.uucp (Chip Salzenberg) writes:
>>Now, if the compiler determines on its own that no aliasing is
>>possible, and then does the optimization on its own, then more power
>>to it.  That's great, because it will work for the individual routines
>>in my code in which no aliasing occurs.  But MSC isn't that smart yet.
>
>I don't beleive *any* compiler could be that smart.  Any routine that was
>passed a pointer couldn't use any global or static data, for fear that it
>is being aliased by the pointer.  The compiler, unless it looks at all the
>code (and all the possible ways of calling that function) could not possibly
>do this kind of optimization on it's own.

Actually, it is possible to do a pretty decent job of alias analysis; it is
just very computationaly expensive.  We have been investigating some
possibilities as an outgrowth of our interprocedural optimization research and
have developed an algorithm we think will work. Unfortunately, it is order n
to the power you don't even want to think about. And assumes an underlying
full interprocedural analysis to boot.

For now I think we're stuck with some sort of 'relax aliasing' option for
those wanting to get the most out of their compiler and willing to cooperate a
little bit with it.

[Now Preston can give us his 'why I like Fortran' spiel ;-) ]

Mark Roberts
{uw-beaver|uunet}!microsoft!markro
-- 
Send compilers articles to compilers@esegue.segue.boston.ma.us
{spdcc | ima | lotus}!esegue.  Meta-mail to compilers-request@esegue.
Please send responses to the author of the message, not the poster.
Technical Details
Message-ID: <54866@microsoft.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!spdcc!esegue!compilers-sender
References: <4886@daffy.cs.wisc.edu> <26547195.F69@tct.uucp> <1990May19.141401.4350@ux1.cso.uiuc.edu> <265861D7.3293@tct.uucp> <1913@cod.NOSC.MIL>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!spdcc!esegue!compilers-sender
From: markro@microsoft.UUCP (Mark ROBERTS)
Newsgroups: comp.sys.ibm.pc.programmer,comp.compilers
Subject: Re: No Aliasing Compile Option
Keywords: aliases, optimizing compilers, C
Message-ID: <54866@microsoft.UUCP>
Date: 25 May 90 18:37:42 GMT
References: <4886@daffy.cs.wisc.edu> <26547195.F69@tct.uucp> <1990May19.141401.4350@ux1.cso.uiuc.edu> <265861D7.3293@tct.uucp> <1913@cod.NOSC.MIL>
Sender: compilers-sender@esegue.segue.boston.ma.us
Reply-To: markro@microsoft.UUCP (Mark ROBERTS)
Followup-To: comp.compilers
Organization: Microsoft Corp., Redmond WA
Lines: 32
Approved: compilers@esegue.segue.boston.ma.us