Cobol: Optimize floating-point ADD/SUBTRACT by using GENERIC arithmetic.
Cobol floating-point ADD/SUBTRACT operations now use GENERIC arithmetic for improved performance.
This change replaces library routine calls with GENERIC arithmetic for floating-point ADD and SUBTRACT operations in Cobol. This optimization aims to accelerate execution by performing calculations directly within the compiler’s intermediate representation. The update also includes minor fixes and new helper routines for floating-point conversion.
In Details
The cobol frontend's arithmetic routines in compare.cc and genmath.cc have been refactored to use GENERIC tree nodes instead of external library calls for floating-point addition and subtraction. This change, along with the introduction of get_fbinary_value, aims to improve performance by leveraging the compiler's internal arithmetic capabilities. It involves changes to both the compiler frontend and the libgcobol runtime library.