Landing: 54c3d316d508

Project / Subsystem

gcc / gcc

Date

2026-08-26

Author

Aldy Hernandez

Commit

54c3d316d50895d5a81290f9392e5c01b9000519

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
—
commit_hash
54c3d316d50895d5a81290f9392e5c01b9000519
source_type
github
headline
Add prevailing exit edge to copy_bbs.
tldr
Control flow graph copier improved to handle abnormal exit edges.
author
Aldy Hernandez
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • control flow graph
  • • refactor
discussion_id_link
—
bugzilla_pr
—
date
2026-08-26T00:00:00.000Z

The basic block (BB) copier in GCC’s control flow graph (CFG) handling has been enhanced to recognize a ‘prevailing exit edge’. This allows the backwards threader to correctly manage abnormal edges (like exceptions or early returns) that leave a copied region. The changes modify cfghooks.h and cfghooks.cc to incorporate this new concept, ensuring that such abnormal exits are handled properly without misinterpreting the control flow. New test cases verify this functionality.