COBOL: Improves GENERIC for conditionals and comparisons
Improves execution speed of conditional logic and comparisons in COBOL programs.
This commit refines how GENERIC is used to create conditional logic and comparison operations in COBOL, leading to improved execution speed. Several all-purpose routines in libgcobol.so have been replaced with specialized routines implemented in GENERIC. Altered alphabets are now flagged to improve speed.
In Details
This commit touches Make-lang.in, cobol1.cc, and genapi.cc, indicating modifications to the COBOL compiler's front-end and potentially its interface with the middle-end's GENERIC representation. The changes focus on optimizing conditional statements and comparisons, which are frequent operations in COBOL programs. The introduction of __builtin_swap* suggests potential endianness handling improvements. Expect performance improvements for COBOL programs with heavy use of conditionals and comparisons.
For Context
The GNU COBOL compiler translates COBOL source code into machine code. This commit focuses on improving the compiler's internal representation of conditional statements (like IF) and comparison operations. By optimizing these common operations, the generated machine code becomes more efficient, resulting in faster execution of COBOL programs. The compiler is now better at generating optimized code for comparing different data types (numeric, alphanumeric).