This is the mail archive of the
mailing list for the GCC project.
Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0
- From: Uday Khedker <uday at cse dot iitb dot ac dot in>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 24 Jan 2013 00:42:11 +0530
- Subject: Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0
- References: <5075B6B9.email@example.com> <CAGWvny=T-Hqb1_txpCMo5gVKSsYd3y9y2xOwDMuQ6PjfqmFScA@mail.gmail.com> <5076375A.firstname.lastname@example.org> <CAFiYyc1gtxcFP0XKGP1arNUN2dA=f+Tn5h_AKq6asXihXGqNDg@mail.gmail.com> <5076EB85.email@example.com> <CAD_=9DQXOfw8a1Z9vAX+FJcLtbu_5LLgafFeK5-ue9gLzqjfirstname.lastname@example.org> <50779F81.email@example.com> <CA+=Sn1kcBM48UKep6pmjYQFno9fxHagRVWaoCB-DucT=XjPk6A@mail.gmail.com> <5077AD8F.firstname.lastname@example.org> <CAFiYyc2n_VutJTLZmk2-q=k4+FE9Tnd9KDv4DH+x+26OBO_AgA@mail.gmail.com> <5077E6DD.email@example.com> <CAFiYyc2gUX57-otpNE89YV=YJQOfwW340HHSYB+0BiFLDB_Jew@mail.gmail.com> <5077E929.firstname.lastname@example.org>
I am trying to understand the full implications of your statement:
>> Yes, that's what I say. Any pointer that is dereferenced is first
>> copied to
>> an SSA name. Basically everything residing in memory first has to be
>> loaded to an SSA name before it can be dereferenced. That load is
>> in the IL
There are many parts and let me take one by one:
- You talk about dereference. So a statement p=q would not mean loading
q into memory. Had q been a global scalar variable, it would have been
loaded into an SSA name. Then why is it not loaded when it is global
pointer. Why a load only for p=*q and not for p=q?
- When we have p=*q, agreed that we are loading a value from memory but
then it is *q that is being loaded. Why should an SSA name be created
for q even when q is a local pointer?
What am I missing?
On Friday 12 October 2012 03:25 PM, Uday P. Khedker wrote:
Richard Biener wrote, On Friday 12 October 2012 03:20 PM:
On Fri, Oct 12, 2012 at 11:46 AM, Uday P. Khedker
Richard Biener wrote, On Friday 12 October 2012 02:51 PM:
we _always_ see
ssa_name_1 = a;
so you have a place to associate your flow-sensitive and
points-to-info with (the SSA name). My point is that for _using_ the
points-to info flow-sensitivity provided by SSA form is enough. For
it you of course need to flow-sensitively process assignments to 'a'.
This is VERY interesting! I had not thought about the difference between
and using values. Now that you point it out, I think all we need to
do is to
flow-sensitively computed values to ssa names.
What about variables that do not have ssa names? Or are you saying
variables would be copied into an artificial variables that have ssa
to observe this in the dumps but I don't know if it holds in general.
Yes, that's what I say. Any pointer that is dereferenced is first
an SSA name. Basically everything residing in memory first has to be
loaded to an SSA name before it can be dereferenced. That load is
in the IL so you should already compute points-to sets for the SSA name
destination of the load.