Landing: 9892eb566c4c

Project / Subsystem

gcc / avoid-store-forwarding

Date

2026-03-24

Author

Konstantinos Eleftheriou

Commit

9892eb566c4cbf6feba50c7d98b10ea8c204018a

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
avoid-store-forwarding
patch_id
commit_hash
9892eb566c4cbf6feba50c7d98b10ea8c204018a
source_type
github
headline
Avoid-store-forwarding: Remove unnecessary store_exprs_del mechanism
tldr
The avoid-store-forwarding pass removes an unnecessary mechanism that caused O(n^2) behavior for large basic blocks.
author
Konstantinos Eleftheriou
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • optimization
  • store-forwarding
  • performance
  • gcc
discussion_id_link
bugzilla_pr
date
2026-03-24T00:00:00.000Z

The store_exprs_del vector in GCC’s avoid-store-forwarding pass was introduced as a safety measure but is no longer needed for correctness. Its removal simplifies the code and eliminates an O(n^2) scan, improving performance for large basic blocks. The vector tracked deleted store candidates and blocked forwarding when a deleted store’s range overlapped with the load, but the intended memory effects were already visible.