scispace - formally typeset
Open AccessJournal ArticleDOI

Dynamic dispatch of context-sensitive optimizations

TLDR
This paper combines finite state machines and dynamic dispatching to allow fully context-sensitive specialization while cloning only functions that are effectively optimized, which makes it possible to apply very liberal optimizations, such as context- sensitive constant propagation, in large programs—something that could not have been easily done before.
Abstract
Academia has spent much effort into making context-sensitive analyses practical, with great profit. However, the implementation of context-sensitive optimizations, in contrast to analyses, is still not practical, due to code-size explosion. This growth happens because current technology requires the cloning of full paths in the Calling Context Tree. In this paper, we present a solution to this problem. We combine finite state machines and dynamic dispatching to allow fully context-sensitive specialization while cloning only functions that are effectively optimized. This technique makes it possible to apply very liberal optimizations, such as context-sensitive constant propagation, in large programs—something that could not have been easily done before. We demonstrate the viability of our idea by formalizing it in Prolog, and implementing it in LLVM. As a proof of concept, we have used our state machines to implement context-sensitive constant propagation in LLVM. The binaries produced by traditional full cloning are 2.63 times larger than the binaries that we generate with our state machines. When applied on Mozilla Firefox, our optimization increases binary size from 7.2MB to 9.2MB. Full cloning, in contrast, yields a binary of 34MB.

read more

Content maybe subject to copyright    Report

Citations
More filters
Journal ArticleDOI

Contextual dispatch for function specialization

TL;DR: This paper proposes an approach to further the specialization of dynamic language compilers, by disentangling classes of behaviors into separate optimization units, and describes a compiler for the R language which uses this approach.
Proceedings ArticleDOI

Inlining for Code Size Reduction

TL;DR: In this paper, the benefits of inlining for code size reduction are evaluated on MiBench, showing that inlining enables context-sensitive optimizations that reduce code, while preserving the performance gains of LLVM's standard inlining decisions.
Proceedings ArticleDOI

Jasmine: A Static Analysis Framework for Spring Core Technologies

TL;DR: Jasmine as mentioned in this paper is a static analysis framework for Spring core technologies that extends from Soot to enhance the call graph completeness while not greatly affecting its performance, which is expected to provide significant benefits for many program analyses scenes of Spring applications.
References
More filters
Proceedings ArticleDOI

LLVM: a compilation framework for lifelong program analysis & transformation

TL;DR: The design of the LLVM representation and compiler framework is evaluated in three ways: the size and effectiveness of the representation, including the type information it provides; compiler performance for several interprocedural problems; and illustrative examples of the benefits LLVM provides for several challenging compiler problems.
Book

Principles of program analysis

TL;DR: This book is unique in providing an overview of the four major approaches to program analysis: data flow analysis, constraint-based analysis, abstract interpretation, and type and effect systems.
Proceedings ArticleDOI

FlowDroid: precise context, flow, field, object-sensitive and lifecycle-aware taint analysis for Android apps

TL;DR: FlowDroid is presented, a novel and highly precise static taint analysis for Android applications that successfully finds leaks in a subset of 500 apps from Google Play and about 1,000 malware apps from the VirusShare project.
Book

Optimizing Compilers for Modern Architectures: A Dependence-based Approach

Ken Kennedy, +1 more
TL;DR: A broad introduction to data dependence, to the many transformation strategies it supports, and to its applications to important optimization problems such as parallelization, compiler memory hierarchy management, and instruction scheduling are provided.
Proceedings ArticleDOI

Efficient path profiling

TL;DR: A new algorithm for path profiling is described, which selects and places profile instrumentation to minimize run-time overhead and identifies longer paths than a previous technique, which predicted paths from edge profiles.
Related Papers (5)