Parameterized Algorithms and Complexity for Function Merging with Branch Reordering
Amir K. Goharshady, Kerim Kochekov, Tian Shu, Ahmed Khaled Zaher

TL;DR
This paper studies a generalized function merging problem with branch reordering, proving its NP-hardness and developing fixed-parameter tractable algorithms based on branching factor and nesting depth.
Contribution
It introduces a new, more flexible formulation of function merging, analyzes its complexity, and provides parameterized algorithms and hardness results.
Findings
Problem is NP-hard even with constant parameters.
Developed FPT algorithms with respect to branch and nesting parameters.
First systematic study of branch reordering in function merging.
Abstract
Binary size reduction is an increasingly important optimization objective for compilers. One emerging technique is function merging, where multiple similar functions are merged into one, thereby eliminating redundancy. The SOTA approach to perform the merging is based on sequence alignment, where functions are viewed as linear sequences of instructions that are then matched in a way maximizing their alignment. In this paper, we consider a significantly generalized formulation of the problem by allowing reordering of branches within each function, subsequently allowing for more flexible matching and better merging. We show that this makes the problem NP-hard, and thus we study it through the lens of parameterized algorithms and complexity, where we identify certain parameters of the input that govern its complexity. We look at two natural parameters: the branching factor and nesting…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
