Efficient Algorithms for Partial Constraint Satisfaction Problems over Control-flow Graphs
Xuran Cai, Amir Goharshady

TL;DR
This paper introduces a linear-time algorithm for solving Partial Constraint Satisfaction Problems over control-flow graphs using SPL decompositions, improving efficiency for compiler optimization tasks like register allocation and bank selection.
Contribution
It presents a general algorithm for PCSPs on SPL graphs with a fixed domain, unifying previous approaches and demonstrating significant runtime improvements.
Findings
Algorithm runs in linear time for fixed domain sizes.
Achieved fourfold speedup over previous methods in bank selection.
Unified approach for multiple compiler optimization problems.
Abstract
In this work, we focus on the Partial Constraint Satisfaction Problem (PCSP) over control-flow graphs (CFGs) of programs. PCSP serves as a generalization of the well-known Constraint Satisfaction Problem (CSP). In the CSP framework, we define a set of variables, a set of constraints, and a finite domain that encompasses all possible values for each variable. The objective is to assign a value to each variable in such a way that all constraints are satisfied. In the graph variant of CSP, an underlying graph is considered and we have one variable corresponding to each vertex of the graph and one or several constraints corresponding to each edge. In PCSPs, we allow for certain constraints to be violated at a specified cost, aiming to find a solution that minimizes the total cost. Numerous classical compiler optimization tasks can be framed as PCSPs over control-flow graphs. Examples…
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.
Taxonomy
TopicsConstraint Satisfaction and Optimization · Formal Methods in Verification · Logic, programming, and type systems
