GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc

New wrappers for named instruction patterns

Introduces `gen_insn_<name>` wrappers for generating uninserted instructions from named patterns.

This commit enhances GCC’s instruction generation mechanism by adding gen_insn_<name> wrapper functions. These wrappers, created using make_*_insn_raw, generate uninserted instructions directly from named patterns. This change affects various parts of the compiler, including RTL emission, code generation, and specific target backend implementations.

In Details

GCC's code generation flow has been updated to introduce gen_insn_<name> functions. These are wrappers around make_*_insn_raw that create rtx_insn objects for named patterns without immediately inserting them into the instruction stream. This differs from the existing gen_<name> functions, which might return a pattern or an rtx_insn for expanded sequences. The changes impact genemit.cc, genflags.cc, gensupport.cc, and numerous target-specific files that use these generation primitives.

For Context
rtx_insn
The internal GCC data structure representing an assembly instruction within the RTL. It holds information about the instruction's operation, operands, and associated metadata.
RTL
Register Transfer Language, an intermediate representation used by GCC to represent programs after the front-end has parsed them. It describes operations on registers and memory.
make_*_insn_raw
Internal GCC functions used to construct raw (uninserted) RTL instruction objects, specifying details like operation, operands, and location.
named patterns
In GCC's machine description files, named patterns define specific instruction templates that the compiler can generate.
Filed Under: gcccodegenrtl