Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP C/HP-UX Programmer's Guide: HP-UX Systems > Chapter 4 Optimizing HP C Programs

Supporting Optimization Options

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

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.

+O[no]clone

This option allows the user to turn on[off] the cloning facility of the optimizer. Cloning is on by default.

This option is mainly provided for users who may see a lot of cloning adversely affecting the performance of their code.If inlining is turned off, cloning is turned off by default. You cannot specify +Onoinline +Oclone.

+O[no]memory[=malloc]

This option enables[disables] memory optimizations.

Specifying ‘malloc’ in the list enables[disables] optimizations which consolidate memory allocation procedure calls. This option is disabled by default. It is incompatible with +Oopenmp and +Oparallel, and is ignored when these options are in effect.

 

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2003 Hewlett-Packard Development Company, L.P.