tree-ssa-structalias.cc: Why do we iterate over fields of a global varinfo

Project / Subsystem

gcc / tree-ssa-structalias.cc

Date

2026-09-01

Proposer

Filip Kastl <fkastl@suse.cz>

Source type

public_inbox

Consensus

Proposed

Sentiment

7/10

Technical tradeoffs

  • • Potential redundancy in analysis loops.
  • • Correctness of handling global aggregate field information.

All attributes

project
gcc
subsystem
tree-ssa-structalias.cc
patch_id
—
discussion_id
apaWVIe17Ac-Fk7c@localhost.localdomain
source_type
public_inbox
title
tree-ssa-structalias.cc: Why do we iterate over fields of a global varinfo
headline
tree-ssa-structalias.cc: Why do we iterate over fields of a global varinfo
tldr
Investigating IPA PTA code regarding shadow vars and global aggregate fields.
proposer
Filip Kastl <fkastl@suse.cz>
consensus
Proposed
outcome
proposed
sentiment_score
7
technical_tradeoffs
  • • Potential redundancy in analysis loops.
  • • Correctness of handling global aggregate field information.
series_id
—
series_role
standalone
series_parts
[]
tags
  • • gcc
  • • compiler
  • • analysis
  • • ipa
  • • pta
bugzilla_url
—
date
2026-09-01T00:00:00.000Z

tree-ssa-structalias.cc: Why do we iterate over fields of a global varinfo

Filip Kastl questions why IPA PTA code in tree-ssa-structalias.cc iterates over fields of a global aggregate variable. He wonders if varinfos representing fields of global aggregates are not marked as global, making the second loop redundant. A subsequent comment from Filip suggests he found an explanation in gimple-ssa-pta-constraints.cc, indicating that subfields for globals are not used in IPA mode.