Landing: 94082ac189cf

Project / Subsystem

gcc / x86

Date

2026-04-14

Author

H.J. Lu

Commit

94082ac189cf318ea4ad52ffdf9fa5f941ebcf9e

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
x86
patch_id
commit_hash
94082ac189cf318ea4ad52ffdf9fa5f941ebcf9e
source_type
github
headline
Implement TARGET_FNTYPE_ABI to avoid callee-saved register spills
tldr
x86 now uses TARGET_FNTYPE_ABI to prevent unnecessary spills of callee-saved registers when calling functions with no_caller_saved_registers.
author
H.J. Lu
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • x86
  • abi
  • optimization
discussion_id_link
bugzilla_pr
date
2026-04-14T00:00:00.000Z

This commit introduces the TARGET_FNTYPE_ABI mechanism for x86, preventing unnecessary spills of callee-saved registers when calling functions marked with no_caller_saved_registers. This change refactors call expansion logic, removing explicit ABI-switching clobbers and correctly handling TLS calls and function ABIs, improving code generation efficiency and correctness.