HPlogo HP C/HP-UX Release Notes for HP-UX 10.20: HP 9000 Computers > Chapter 1 New and Changed Features

New Features Introduced in A.10.32

» 

Technical documentation

Complete book in PDF

 » Table of Contents

This section describes major changes implemented by HP C version A.10.32.

New Optimization Options

New or changed optimization options to enhance performance are:

  • +Odataprefetch — to generate data prefetch instructions for data structures referenced within innermost loops.

  • +Oentrysched — changing to make save and restore operations more efficient.

  • +Ofailsafe — to enable fail-safe optimization by default.When a compilation fails at the current optimization level, +Ofailsafe will automatically restart the compilation at a lower level of optimization.

  • +Ofltacc — to provide better performance for PA-RISC 2.0 targets.

  • +Oglobal_ptrs_unique — to tell the optimizer whether there are unique global pointer variable names, and what the names are.

  • +Oinline_budget — to perform aggressive inlining.

  • +Oloop_unroll — to enable loop unrolling.

  • +Optrs_ansi — to assume that an int *p points to an int field of a struct or union, and that char * points to any type of object.

  • +Optrs_to_globals — to tell the optimizer whether global variables are modified through pointers.

  • +Optrs_strongly_typed — to assume that all pointers are type safe.

  • +Ostatic_prediction — to enable static branch prediction.

  • +Owhole_program_mode — to hold global variables in registers longer and delete inlined or cloned global procedures.

  • +ESfic option — to replace millicode calls with inline code for fast indirect calls.

Additional Optimization Changes

New or changed optimization options to enhance performance are:

  • Enhancement to optimization levels 2, 3, and 4 to enhance performance of programs including macro definitions of ABS, MIN, and MAX.

  • New +DA designations for PA-RISC 2.0 model and processor numbers to generate code for the PA-RISC 2.0 systems. Also a +DAportable option to generate code compatible across PA-RISC 2.0 and 1.1 workstations and servers. Default architecture object code generation is now determined automatically on all systems as that of the machine on which you compile.

  • New +DS designations for PA-RISC 2.0 model and processor numbers to perform instruction scheduling tuned for PA-RISC 2.0 systems. Default instruction scheduling is now determined automatically on all systems as that of the machine on which you compile.

Changes to Debugging of Optimized Code

Support for debugging of optimized code at optimization levels 1 and 2 (in conjunction with HP/DDE) now includes:

  • 3 location tracking mappings between source lines and object code locations. Single-stepping and breakpoint setting supported for 3 models of location mappings.

  • Breakpoints and single-stepping based on Source Statement Order and Statement Completion location mapping models.

  • Assembly level debugging incorporating the new Statement Completion model and enhancements to the statement fragment model.

  • Tracking updates of user variables in assignment statements using new statement completion UI commands.

  • Notification when variable values are unavailable, or the accuracy of the data value is questionable due to optimization.

  • Viewing locals, globals, and parameters within procedures, for variables which are active and have not been eliminated due to optimization.

  • Notification of out of order updates to user variables using the Source Order model.

  • Identical program behavior between programs compiled with and without debug.

  • Tracebacks with line-number annotations.

  • Setting breakpoints and single-stepping at the source statement level.

  • Viewing and modifying global variables and parameters at procedure entry.

When -g is used with optimization levels 1 and 2, the -y (static analysis) option is not allowed.

Refer to the discussion on advanced-style (not basic-style) debugging of optimized code in the HP/DDE debugger online help for more information on debugging optimized code.

Miscellaneous Changes to HP C/HP-UX

  • HP C/HP-UX now includes a +help option to invoke online help for the HP C compiler and linker.

  • Note that when code is ported from a PC to a workstation, a carriage return in the PC code is converted to a newline on the workstation. Control M is ignored by cpp.

  • The compiler is now large file aware and will give you the following message if your source file is larger than 2 GB: Can't open filename.

NOTE: At the next major release of the HP C/ANSI C Developer's Bundle, B3899AA, B3898AA, B3901AA, and B3900AA, Hewlett-Packard intends to change the C language default from K&R C to ANSI C. On versions A.10.32.20 and A.10.32 of HP C, K&R C is the default and ANSI C must be selected at compile time with -Aa or -Ae. When ANSI C becomes the default (on the HP-UX 11.0 version of HP C/HP-UX), there will be an option to specify K&R C. The compiler release notes for that release will provide more information.At the next major operating system release the C compiler that is bundled with the operating system and is used to regenerate the kernel will change from cc to cc_bundled.
© 1998 - Hewlett-Packard Development Company, L.P.