Abstract-Smartphones provide applications that are increasingly similar to those of interactive desktop programs, providing rich graphics and animations. To simplify the creation of these interactive applications, mobile operating systems employ highlevel object-oriented programming languages and shared libraries to manipulate the device's peripherals and provide common userinterface frameworks. The presence of dynamic dispatch and polymorphism allows for robust and extensible application coding. Unfortunately, the presence of dynamic dispatch also introduces significant overheads during method calls, which directly impact execution time. Furthermore, since these applications rely heavily on shared libraries and helper routines, the quantity of these method calls is higher than those found in typical desktopbased programs. Optimizing these method calls centrally before consumers download the application onto a given phone is exacerbated due to the large diversity of hardware and operating system versions that the application could run on. This paper proposes a methodology to tailor a given Objective-C application and its associated device-specific shared library codebase using on-device post-compilation code optimization and transformation. In doing so, many polymorphic sites can be resolved statically, improving the overall application performance.
I. INTRODUCTIONThe prevalence of mobile processors has grown significantly over the last few years. At the current rate, mobile processors are becoming increasingly ubiquitous throughout our society, resulting in a diverse range of applications that will be expected to run on these devices. State-of-the-art smartphones have evolved to the level of having feature-rich applications comparable to those of interactive desktop programs, providing high-quality visual and auditory experiences. These mobile processors are becoming increasingly complex in order to respond to this more diverse and demanding application base.From the application perspective, complexity is also growing within the mobile domain. A decade ago, mobile phone applications consisted of a few pre-bundled, hand-optimized programs specifically designed for a given device. Today, there is a vast quantity of applications available within mobile marketplaces; Apple's App Store, for example, had over 775,000 applications available for download at the start of 2013 [1]. Furthermore, mobile applications are now written in high-level, object-oriented programming languages such as Objective-C or Java. These applications tend to be highly interactive, providing visual, auditory, and haptic feedback, as well as leveraging inputs from numerous sensors such as touch, location, nearfield communication, and even eye tracking. To simplify the creation of these interactive applications, mobile operating systems provide foundation libraries to manipulate the device's peripherals and provide common user-interface frameworks.