Litcius/Paper detail

RollBin: reducing code-size via loop rerolling at binary level

Tianao Ge, Zewei Mo, Kan Wu, Xianwei Zhang, Yutong Lu

202211 citationsDOI

Abstract

Code size is an increasing concern on resource constrained systems, ranging from embedded devices to cloud servers. To address the issue, lowering memory occupancy has become a priority in developing and deploying applications, and accordingly compiler-based optimizations have been proposed to reduce program footprint. However, prior arts are generally dealing with source codes or intermediate representations, and thus are very limited in scope in real scenarios where only binary files are commonly provided. To fill the gap, this paper presents a novel code-size optimization RollBin to reroll loops at binary level. RollBin first locates the unrolled loops in binary files, and then probes to decide the unrolling factor by identifying regular memory address patterns. To reconstruct the iterations, we propose a customized data dependency analysis that tackles the challenges brought by shuffled instructions and loop-carry dependencies. Next, the recognized iterations are rolled up through instruction removal and update, which are generally reverting the normal unrolling procedure. The evaluations on standard SPEC2006/2017 and MiBench demonstrate that RollBin effectively shrinks code size by 1.7% and 2.2% on average (up to 7.8%), which respectively outperforms the state-of-the-arts by 31% and 38%. In addition, the use cases of representative realistic applications manifest that RollBin can be applicable in practices.

Topics & Concepts

Computer scienceMemory footprintLoop unrollingCompilerBinary codeParallel computingOptimizing compilerCode (set theory)Binary numberProgram optimizationSource codeLoop fusionComputer engineeringTheoretical computer scienceDistributed computingOperating systemProgramming languageSet (abstract data type)ArithmeticMathematicsParallel Computing and Optimization TechniquesAdvanced Data Storage TechnologiesDistributed systems and fault tolerance
RollBin: reducing code-size via loop rerolling at binary level | Litcius