Landing: b484690a2914

Project / Subsystem

gcc / gcc/tree-optimization

Date

2026-06-30

Author

Andrew MacLeod

Commit

b484690a29147fa190ccb74e0253b2ac89a4ee6d

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc/tree-optimization
patch_id
commit_hash
b484690a29147fa190ccb74e0253b2ac89a4ee6d
source_type
github
headline
Ranger stmt prefill processes dependencies first
tldr
Fixes deep recursion in the Ranger optimization pass by correctly ordering dependency processing.
author
Andrew MacLeod
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • optimization
  • gcc
  • compiler
discussion_id_link
bugzilla_pr
date
2026-06-30T00:00:00.000Z

The Ranger optimization pass previously mishandled dependencies for PHI arguments, potentially leading to deep recursion and negating its intended benefits. This change revises the prefill logic to perform a Depth-First Search (DFS) on the dependency stack, ensuring all operands are processed correctly before proceeding. This resolves issues related to incorrect ordering and improves the pass’s stability.