This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Alias changes
- To: law at cygnus dot com
- Subject: Re: Alias changes
- From: Mark Mitchell <mark at markmitchell dot com>
- Date: Thu, 25 Jun 1998 11:06:52 -0700
- CC: egcs-patches at cygnus dot com
- References: <28905.898797014@hurl.cygnus.com>
- Reply-to: mark at markmitchell dot com
>>>>> "Jeffrey" == Jeffrey A Law <law@hurl.cygnus.com> writes:
Jeffrey> In message
Jeffrey> <199806251749.KAA03423@smtp.earthlink.net>you write: I
Jeffrey> think we need to save/restore the current alias set # as
Jeffrey> we change function contexts so that the current alias set
Jeffrey> # isn't scrogged when we compile a nested function. Even
Jeffrey> if this isn't an issue right now we need to go ahead and
Jeffrey> save/restore the set #. It's simple to do, so I don't
Jeffrey> think you need to resubmit after making this change.
>> I don't quite get this. With my patch, the C front-end
>> assigns alias sets to types lazily, as it creates MEMs who need
>> alias sets. It doesn't make sense to have different types in
>> the same alias set, so I don't see why we'd ever want to
>> restore the alias set counter to a previous value. It should
>> monotonically increase, I think.
Jeffrey> Do they monotonically increase through a function or
Jeffrey> through an entire compilation unit.
Jeffrey> If the former, then we need to save/restore as we change
Jeffrey> function contexts. If the latter, then we do not need to
Jeffrey> save/restore it.
The latter. For example, alias sets are assigned to global variables,
and we must be sure that their alias sets continue to make sense.
Jeffrey> jeff
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com