Assaad, Medhat (2001) Alias-free parameters in C using multibodies. Technical Report 01-05, Computer Science, Iowa State University.
Aliasing may cause problems for both optimization and reasoning about programs. Since static alias analysis
is expensive, and sometimes, even impossible, compilers tend to be conservative. This usually leads to
missing some optimization opportunities. Furthermore, when trying to understand code, one must consider all
possible aliasing patterns. This can make reasonning about code difficult and non-trivial.
We have implemented an approach for having alias-free parameters in C. This approach allows aliasing between
the arguments at the call site, but guarantees that there will be no aliasing between arguments and between
arguments and globals inside procedure bodies. This is done by having multiple bodies, up to one for each
aliasing pattern. Procedure calls will be dispatched to the body that matches the aliasing pattern at the
call site. By having alias-free parameters in the bodies, good optimization can be achieved. Furthermore,
verification and reasoning about the code is easier when there is no aliasing. The main advantages of our
approach are that code to determine the aliasing pattern is automatically generated, and the programmer does
not have to code it by hand.
We tested our implementation, and found that using this approach can be very practical. It is easy to convert
already-existing code to use it. And in some cases, we had run-time execution speedup as much as 29%.
|Keywords:||pointer parameter aliasing, global variable aliasing, multi-body procedures,
dynamic dispatch, static dispatch, ACL language, C/ACL, alias-free programs, compiler opti-mizations,
|Subjects:||Software: PROGRAMMING LANGUAGES: General|
Software: PROGRAMMING LANGUAGES: Formal Definitions and Theory (D.2.1, F.3.1-2, F.4.2-3)
Software: PROGRAMMING LANGUAGES: Language Constructs and Features (E.2)
Software: PROGRAMMING LANGUAGES: Processors
Theory of Computation: LOGICS AND MEANINGS OF PROGRAMS: Specifying and Verifying and Reasoning about Programs (D.2.1, D.2.4, D.3.1, E.1)
|Deposited by:||Medhat Assaad on 03 July 2001|
Contact site administrator at: firstname.lastname@example.org