HPlogo HP C/HP-UX Programmer's Guide: HP 9000 Computers > Chapter 4 Optimizing HP C Programs

Supporting Optimization Options

» 

Technical documentation

Complete book in PDF

 » Table of Contents

Table 4-2 “Other Supporting Optimizations ” shows optimization options that support the core optimization levels. These optimizations are performed only when specifically invoked. They are available at all optimization levels.

Table 4-2 Other Supporting Optimizations

Option

Description

Benefits

+ESfic

Generates object code with fast indirect calls. Only correct for programs not using shared libraries.

Run-time code is faster.

+ESconstlitStores constant-qualified (const) objects and literals in read-only memory.Data that is constant-qualified is easier to fetch. Using this option results in improved performance in some applications.

+ESlit

Places string literals and constants defined with the ANSI C const type qualifier into read-only data storage. Storing to constants with this option will cause segmentation violations.

Reduces memory requirements and improves run-time speed in multi-user applications. Can improve data-cache utilization.

+ESnolitDisables the default behavior which causes the HP C compiler to no longer store literals in read-only memory.Allows you to specify that literals not be placed in read-only memory. This is helpful with programs that violate the semantics of const, which could result in a core dump or bus error.

+I, +P

Enables all profile-based optimizations. Uses execution profile data to identify the most frequently executed code paths. Repositions functions, basic blocks, and aids other optimizations according to these frequently executed paths.

Improves code locality and cache hit rates. Improves efficiency of other optimizations. Benefits most applications, especially large applications with multiple compilation units. May be used at any optimization level.

 

© Hewlett-Packard Development Company, L.P.