5 research outputs found

    Partial Redundancy Elimination for Access Path Expressions

    Get PDF

    Declassification: transforming java programs to remove intermediate classes

    Get PDF
    Computer applications are increasingly being written in object-oriented languages like Java and C++ Object-onented programming encourages the use of small methods and classes. However, this style of programming introduces much overhead as each method call results in a dynamic dispatch and each field access becomes a pointer dereference to the heap allocated object. Many of the classes in these programs are included to provide structure rather than to act as reusable code, and can therefore be regarded as intermediate. We have therefore developed an optimisation technique, called declassification, which will transform Java programs into equivalent programs from which these intermediate classes have been removed. The optimisation technique developed involves two phases, analysis and transformation. The analysis involves the identification of intermediate classes for removal. A suitable class is defined to be a class which is used exactly once within a program. Such classes are identified by this analysis The subsequent transformation involves eliminating these intermediate classes from the program. This involves inlinmg the fields and methods of each intermediate class within the enclosing class which uses it. In theory, declassification reduces the number of classes which are instantiated and used in a program during its execution. This should reduce the overhead of object creation and maintenance as child objects are no longer created, and it should also reduce the number of field accesses and dynamic dispatches required by a program to execute. An important feature of the declassification technique, as opposed to other similar techniques, is that it guarantees there will be no increase in code size. An empirical study was conducted on a number of reasonable-sized Java programs and it was found that very few suitable classes were identified for miming. The results showed that the declassification technique had a small influence on the memory consumption and a negligible influence on the run-time performance of these programs. It is therefore concluded that the declassification technique was not successful in optimizing the test programs but further extensions to this technique combined with an intrinsically object-onented set of test programs could greatly improve its success

    Partial redundancy elimination for access path expressions

    No full text
    Pointer traversals pose significant overhead to the execution of object-oriented programs, since every access to an object?s state requires a pointer dereference. Eliminating redundant pointer traversals reduces both instructions executed as well as redundant memory accesses to relieve pressure on the memory subsystem. We describe an approach to elimination of redundant access expressions that combines partial redundancy elimination (PRE) with type-based alias analysis (TBAA). To explore the potential of this approach we have implemented an optimization framework for Java class files incorporating TBAA-based PRE over pointer access expressions. The framework is implemented as a class-file-to-class-file transformer; optimized classes can then be run in any standard Java execution environment. Our experiments demonstrate improvements in the execution of optimized code for several Java benchmarks running in diverse execution environments: the standard interpreted JDK virtual machine, a virtual machine using ?just-in-time? compilation, and native binaries compiled off-line (?way-ahead-of-time?). Overall, however, our experience is of mixed success with the optimizations, mainly because of the isolation between our optimizer and the underlying execution environments which prevents more effective cooperation between them.We isolate the impact of access path PRE using TBAA, and demonstrate that Java?s requirement of precise exceptions can noticeably impact code-motion optimizations like PRE

    Partial redundancy elimination for access path expressions

    No full text
    ¨Pointer traversals pose significant overhead to the ex-© ecution of object-oriented programs, since every ac-�cess to an object’s state requires a pointer dereference. �Eliminating redundant pointer traversals reduces both �instructions executed as well as redundant memory ac-�cesses to relieve pressure on the memory subsystem. We �describe an approach to elimination of redundant access © expressions that combines partial redundancy elimina-�tion (PRE) with type-based alias analysis (TBAA). To © explore the potential of this approach we have implemented an optimization framework for Java class files �incorporating TBAA-based PRE over pointer�access ex-�pr � essions. The framework is implemented as a classfile-�to-classfile transformer; optimized classes can then be run in any standard Java execution environment. Our © experiments demonstrate improvements in the execu-�tion of optimized code for several Java benchmarks running in diverse execution environments: the standard interpreted JDK virtual machine, a virtual machine us-�ing “just-in-time ” compilation, and native binaries com-�piled off-line (“way-ahead-of-time”). We isolate the im-�pact of access path PRE using TBAA, and demonstrate �that Java’s requirement of precise exceptions can notice-�ably impact code-motion optimizations like PRE.
    corecore