Landing: 131d80fb55d5
Project / Subsystem
gcc / cobol
Date
2026-08-07
Author
Robert Dubner
Commit
131d80fb55d57b4a25ef3d5e62567955df825d7a
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- cobol
- patch_id
- —
- commit_hash
- 131d80fb55d57b4a25ef3d5e62567955df825d7a
- source_type
- github
- headline
- COBOL COMPUTE statements now use Reverse Polish Notation.
- tldr
- COBOL COMPUTE statements are refactored to use RPN, improving efficiency and reducing middle-end load.
- author
- Robert Dubner
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • cobol
- • optimization
- • backend
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-07T00:00:00.000Z
This commit refactors the COBOL COMPUTE statement to use Reverse Polish Notation (RPN) for expression evaluation. Previously, complex expressions like ‘z = a * b + c * d’ would generate numerous temporary variables. The new RPN-based approach utilizes a stack, which is processed by the libgcobol library, leading to more efficient computation and a reduced burden on the GCC middle end.