Go to main content
Oracle® Developer Studio 12.5: C User's Guide

Exit Print View

Updated: June 2017
 
 

6.1 Introduction to Type-Based Analysis

You can use the -xalias_level option to specify one of seven alias levels. Each level specifies a certain set of properties related to the way you use pointers in your C program.

As you compile with higher levels of the -xalias_level option, the compiler makes increasingly extensive assumptions about the pointers in your code. You have greater programming freedom when the compiler makes fewer assumptions. However, the optimizations that result from these narrow assumptions might not result in significant runtime performance improvement. If you code in accordance with the compiler assumptions of the more advanced levels of the -xalias_level option, the resulting optimizations are more likely to enhance runtime performance.

The -xalias_level option specifies which alias level applies to each translation unit. For cases where more detail is beneficial, you can use new pragmas to override whatever alias levels are in effect so that you can explicitly specify the aliasing relationships between individual types or pointer variables in the translation unit.