This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Computation and usage of SSA_NAME_PTR_INFO


On Tue, Apr 30, 2013 at 1:32 PM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Mon, Apr 29, 2013 at 7:34 PM, Nikhil Patil <nikhilpatil3721@gmail.com> wrote:
>> Hello,
>>
>> 1. Which passes of gcc make use of points-to information in
>> SSA_NAME_PTR_INFO (or more precisely, pt_solution) in doing
>> optimizations?
>
> All passes that query the alias oracle (tree-ssa-alias.h) which is almost
> all passes doing optimization of memory accesses.

Thanks a lot for giving direction. I will try finding the passes.

>
>>
>> 2. Also, who computes this points-to information and populates
>> pt_solution? Is it ONLY ipa-pta pass?
>
> It is points-to analysis, both the IPA variant and the local variant
> (ealias and alias
> passes).

>From what I could understand, gimple passes "pass_build_ealias"
(ealias) and "pass_build_alias" (alias) flags "TODO_rebuild_alias" at
end and then function "execute_function_todo" from passes.c calls
"compute_may_aliases ()" which eventually computes points-to
information.

Then the IPA PTA pass finds a more precise points-to information.
Please correct if I am wrong.

>
>> When I accessed pt_solution through a plugin which REPLACES ipa-pta
>> pass, I found that the information (in pt_solution) with and without
>> ipa-pta pass differs only in terms of flags in pt_solution. Here with
>> the examples I could construct, I found that the bitmap 'vars' in
>> pt_solution is same for both the cases. Is it always true?
>
> In theory IPA PTA should be able to compute a more precise solution,
> thus have different (less) bits set in 'vars'.  There are several testcases
> that show this, look for ipa-pta* testcases in gcc/testsuite/
>
> Richard.
>
>> Can someone please help in clarifying these doubts.
>>
>> Thanks in advance.
>>
>> --
>> Regards,
>> Nikhil Patil.

--
Regards,
Nikhil Patil.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]