public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Question about points-to analysis, global variables, IPA, and field sensitivity
@ 2021-03-30  8:50 Erick Ochoa
  2021-03-30 11:20 ` Richard Biener
  0 siblings, 1 reply; 4+ messages in thread
From: Erick Ochoa @ 2021-03-30  8:50 UTC (permalink / raw)
  To: gcc

Hi,

I am looking at the points-to analysis in GCC and I found the
following comment in tree-ssa-structalias.c:

  /* Collect field information.  */
  if (use_field_sensitive
      && var_can_have_subvars (decl)
      /* ???  Force us to not use subfields for globals in IPA mode.
         Else we'd have to parse arbitrary initializers.  */
      && !(in_ipa_mode
           && is_global_var (decl)))


From what I understand here the points-to analysis is explicitly not
using field sensitivity for global variables when in IPA. I am
wondering,
0) Is "initializers" here talking about brace initializers? Or are
"initializers" a little bit more abstract and refer to anything that
can initialize a field? Like struct->field = function()?
1) How much work would it be to parse initializers?
2) How would global structs which are not initialized using
initializers be handled? Would all fields get assigned NULL at the
global variable level, but then as other fields get assigned we just
create new constraints with the correct offsets?

Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-30 11:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30  8:50 Question about points-to analysis, global variables, IPA, and field sensitivity Erick Ochoa
2021-03-30 11:20 ` Richard Biener
2021-03-30 11:39   ` Erick Ochoa
2021-03-30 11:44     ` Richard Biener

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).