Landing: 4756a4c0cfae

Project / Subsystem

gcc / gcc/genrecog

Date

2026-08-07

Author

Kyrylo Tkachov

Commit

4756a4c0cfaeb18e7fff9108cd9c5d1e1e116690

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
gcc/genrecog
patch_id
—
commit_hash
4756a4c0cfaeb18e7fff9108cd9c5d1e1e116690
source_type
github
headline
genrecog: Write each .md condition out once
tldr
Reduces the size of insn-recog-*.cc files by emitting conditions as inline functions.
author
Kyrylo Tkachov
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • gcc
  • • optimization
  • • code generation
  • • aarch64
discussion_id_link
—
bugzilla_pr
—
date
2026-08-07T00:00:00.000Z

The genrecog tool in GCC previously emitted each pattern condition inline, leading to duplicated code and large generated files. This commit refactors genrecog to define a helper inline function for each unique condition and call that function from the generated code. This significantly reduces the size of insn-recog-*.cc files, speeds up compilation, and lowers memory usage, as demonstrated on AArch64.