public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
To: law@cygnus.com
Cc: egcs@egcs.cygnus.com
Subject: Re: Would alias analysis help WRT builtin memmove -> builtin memcpy ?
Date: Wed, 29 Mar 2000 15:34:00 -0000	[thread overview]
Message-ID: <200003292334.SAA02200@caip.rutgers.edu> (raw)

 > From: Jeffrey A Law <law@cygnus.com>
 > 
 >   In message < 200003292249.RAA29751@caip.rutgers.edu >you write:
 >   > So I naively tried the type based stuff, using get_alias_type() on the
 >   > TREE_VALUE() of the parameters.  But I quickly saw that by the time I
 >   > got the argument trees, they were already both of type void* so the
 >   > types aliased to the same set.  (At least that's my uneducated guess,
 >   > they were both in the same set #11, while the length parameter was in
 >   > set #9.)
 > By definition, a void * can alias anything (just like a char *).

Right, but then shouldn't it have returned set 0, not 11?  Anyway, for
the question at hand, I don't think type based aliasing is
appropriate.  I was just playing around with it...


 > 
 >   > Then I thought the base ptr stuff might be useful, but I wasn't sure
 >   > how to access that code.  Any pointers?  (No pun intended...)
 > The code is not designed for you to be able to independently ask about
 > type or base pointer aliasing questions, but  instead can pointers A and
 > B alias each other -- if it returns yes, then they may alias, you don't
 > know how or why, only that they may alias.
 > 
 > I don't think adding separate queries of this nature would be a good idea.
 > jeff

I didn't plan to add any new queries.  What you describe is exactly
what I wanted to do.

If I can test whether the src and dst pointers passed to memmove _may_
alias each other and the existing query tells me they don't, then its
safe to call expand_builtin_memcpy in place of memmove.  Right?

So can you point me at existing code which does this?  Given some
examples, I'll try and figure out how to do this on my own.  (If only
for fun, whether I produce something useful can be evaluated later.)

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions

             reply	other threads:[~2000-03-29 15:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-29 15:34 Kaveh R. Ghazi [this message]
2000-03-29 15:44 ` Jeffrey A Law
  -- strict thread matches above, loose matches on Subject: below --
2000-03-29 16:13 Kaveh R. Ghazi
2000-03-29 16:22 ` Jeffrey A Law
2000-03-29 14:50 Kaveh R. Ghazi
2000-03-29 15:26 ` Jeffrey A Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200003292334.SAA02200@caip.rutgers.edu \
    --to=ghazi@caip.rutgers.edu \
    --cc=egcs@egcs.cygnus.com \
    --cc=law@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).