Sun Studio 12 Update 1: C++ User's Guide

A.2.114 –xcache=c

Defines cache properties for use by the optimizer. This option does not guarantee that any particular cache property is used.


Note –

Although this option can be used alone, it is part of the expansion of the -xtarget option; its primary use is to override a value supplied by the -xtarget option.


This release introduces an optional property [/ti] which sets the number of threads that can share the cache.

A.2.114.1 Values

c must be one of the following values.

Table A–25 The -xcache Values

Value 

Meaning 

generic

This is the default value which directs the compiler to use cache properties for good performance on most x86 and SPARC processors, without major performance degradation on any of them. 

With each new release, these best timing properties will be adjusted, if appropriate. 

native

Set the parameters for the best performance on the host environment. 

s1/l1/a1[/t1]

Defines level 1 cache properties 

s1/l1/a1[/t1]:s2/l2/a2[/t2]

Defines level 1 and 2 cache properties 

s1/l1/a1[/t1]:s2/l2/a2[/t2]:s3/l3/a3[/t3]

Defines level 1, 2, and 3 cache properties 

The definitions of the cache properties si/li/ai/ti are as follows:

Property 

Definition  

si

The size of the data cache at level i, in kilobytes

li

The line size of the data cache at level i, in bytes

ai

The associativity of the data cache at level i

For example, i=1 designates level 1 cache properties, s1/l1/a1.

Defaults

If –xcache is not specified, the default –xcache=generic is assumed. This value directs the compiler to use cache properties for good performance on most SPARC processors, without major performance degradation on any of them.

If you do not specify a value for t, the default is 1.

Examples

–xcache=16/32/4:1024/32/1 specifies the following:

Level 1 Cache Has  

Level 2 Cache Has 

16 Kbytes 

1024 Kbytes 

32 bytes line size 

32 bytes line size 

4-way associativity 

Direct mapping associativity 

See also

–xtarget=t