Wednesday Jun 27, 2007

New Article: Prefetching

Prefetching Pragmas and Intrinsics

Diane Meirowitz, Senior Staff Engineer, and Spiros Kalogeropulos, Staff Engineer, June, 2007

Introduction

Explicit data prefetching pragmas and intrinsics for the x86 platform and additional pragmas and intrinscs for the SPARC platform are now available in Sun Studio 12 compilers, released June 2007.

Prefetch instructions can increase the speed of an application substantially by bringing data into cache so that it is available when the processor needs it. This benefits performance because today's processors are so fast that it is difficult to bring data into them quickly enough to keep them busy, even with hardware prefetching and multiple levels of data cache.

The compilers have several options that enable them to generate prefetch instructions automatically: -xprefetch, -xprefetch_level, and -xprefetch_auto_type (described below). The compilers generally do an excellent job of inserting prefetch instructions, and this is the most portable and best way to use prefetch. If finer control of prefetching is desired, prefetch pragmas or intrinsics can be used. Note that the performance benefit due to prefetch instructions is hardware-dependent and prefetches which improve performance on one chip may not have the same effect on a different chip. It is a good idea to study the instruction reference manual for the target hardware before inserting prefetch pragmas or intrinsics. Furthermore, the Sun Studio Performance Analyzer can be used to identify the cache misses of an application.


[Read More]

Friday Jun 08, 2007

New Features in Sun Studio 12 Compilers

Here's what's new and changed in the Sun Studio 12 compilers: 

A New Way To Specify 32-bit or 64-bit Address Model

You no longer need use the -xarch option to specify a 32-bit or 64-bit address model (LP64 versus ILP32). Two new options make it easier:

  • -m32 specifies the ILP32 model: 32-bit ints, longs, and pointer types.

  • -m64 specifies the LP64 model: 32-bit ints, 64-bit longs and pointers types. (Note that -m64 is the default on Linux platforms.)

Deprecated -xarch Flags and Their Replacements Across SPARC and x86

  • Use -m64 in place of -xarch=generic64

  • Use -m64 -xarch=native in place of -xarch=native64

If you are using -xarch=v9 or -xarch=amd64 to specify a 64-bit address model, use just -m64 instead. No -xarch value is required.

[Read More]
About

Application development on Solaris OS

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today