Advanced

Performance Evaulation of ISO C restrict on the Power Architecture

Botvalde, Anton LU and Larsson, Andreas (2015) EDA920 20142
Department of Computer Science
Abstract
The C99 standard for the C programming language introduced the new type qualifier restrict which acts as a hint for the compiler and the programmer that the specified pointer is not aliased by any other pointer if the pointed object can be modified. By using restrict on pointers the compiler may, if implemented and allowed, optimize code even further. This thesis investigates how well the C compilers GCC, Clang and XL C implements optimizations based on restrict on the Power architecture. By running a modified Livermore benchmark consisting of different loops that are suitable for restrict based optimizations we show that all three compilers are capable of doing restrict based optimizations. Furthermore we investigate loops using a... (More)
The C99 standard for the C programming language introduced the new type qualifier restrict which acts as a hint for the compiler and the programmer that the specified pointer is not aliased by any other pointer if the pointed object can be modified. By using restrict on pointers the compiler may, if implemented and allowed, optimize code even further. This thesis investigates how well the C compilers GCC, Clang and XL C implements optimizations based on restrict on the Power architecture. By running a modified Livermore benchmark consisting of different loops that are suitable for restrict based optimizations we show that all three compilers are capable of doing restrict based optimizations. Furthermore we investigate loops using a pipeline simulator in order to understand the performance characteristics of the optimizations. We show that the performance for each loop vary by compiler, some loops have their running time significantly reduced while others, somewhat surprisingly, actually have their run time increased. Finally we provide some general suggestions for programmers and compiler developers on how to best use restrict. (Less)
Please use this url to cite or link to this publication:
author
Botvalde, Anton LU and Larsson, Andreas
supervisor
organization
course
EDA920 20142
year
type
H3 - Professional qualifications (4 Years - )
subject
keywords
C programming language, restrict, optimizing compilers, Power architecture, pipeline simulation
report number
2015-02
ISSN
1650-2884
language
English
id
4941274
date added to LUP
2015-01-27 08:15:32
date last changed
2015-01-27 08:15:32
@misc{4941274,
  abstract     = {The C99 standard for the C programming language introduced the new type qualifier restrict which acts as a hint for the compiler and the programmer that the specified pointer is not aliased by any other pointer if the pointed object can be modified. By using restrict on pointers the compiler may, if implemented and allowed, optimize code even further. This thesis investigates how well the C compilers GCC, Clang and XL C implements optimizations based on restrict on the Power architecture. By running a modified Livermore benchmark consisting of different loops that are suitable for restrict based optimizations we show that all three compilers are capable of doing restrict based optimizations. Furthermore we investigate loops using a pipeline simulator in order to understand the performance characteristics of the optimizations. We show that the performance for each loop vary by compiler, some loops have their running time significantly reduced while others, somewhat surprisingly, actually have their run time increased. Finally we provide some general suggestions for programmers and compiler developers on how to best use restrict.},
  author       = {Botvalde, Anton and Larsson, Andreas},
  issn         = {1650-2884},
  keyword      = {C programming language,restrict,optimizing compilers,Power architecture,pipeline simulation},
  language     = {eng},
  note         = {Student Paper},
  title        = {Performance Evaulation of ISO C restrict on the Power Architecture},
  year         = {2015},
}