Landing: 3c71ff89bb03

Project / Subsystem

gcc / bpf

Date

2026-07-20

Author

Vineet Gupta

Commit

3c71ff89bb03152828f0efc5f1de5febf35fc039

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
bpf
patch_id
commit_hash
3c71ff89bb03152828f0efc5f1de5febf35fc039
source_type
github
headline
bpf: Use pattern_cost() for instruction cost estimation
tldr
BPF backend now uses a generic pattern_cost() function instead of hardcoding instruction costs.
author
Vineet Gupta
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • bpf
  • cost model
  • optimization
discussion_id_link
bugzilla_pr
date
2026-07-20T00:00:00.000Z

The BPF backend has been updated to use the generic pattern_cost() function for estimating instruction costs, replacing a hardcoded value of 1. This change aligns the BPF backend with practices in other GCC backends, providing a more consistent and flexible way to manage instruction costs. The cost of a default instruction is now determined by its associated pattern, allowing for finer-grained cost modeling.