Header menu link for other important links
X
Improved bitwidth-aware variable packing
Published in
2013
Volume: 10
   
Issue: 3
Abstract
Bitwidth-aware register allocation has caught the attention of researchers aiming to effectively reduce the number of variables spilled into memory. For general-purpose processors, this improves the execution time performance and reduces runtime memory requirements (which in turn helps in the compilation of programs targeted to systems with constrained memory). Additionally, bitwidth-aware register allocation has been effective in reducing power consumption in embedded processors. One of the key components of bitwidth-aware register allocation is the variable packing algorithm that packs multiple narrow-width variables into one physical register. Tallam and Gupta [2003] have proved that optimal variable packing is an NP-complete problem for arbitrary-width variables and have proposed an approximate solution. In this article, we analyze the complexity of the variable packing problem and present three enhancements that improve the overall packing of variables. In particular, the improvements we describe are: (a) Width Static Single Assignment (W-SSA) form representation that splits the live range of a variable into several fixed-width live ranges (W-SSA variables); (b) PoTR Representation - use of powers-of-two representation for bitwidth information for W-SSA variables. Our empirical results have shown that the associated bit wastage resulting from the overapproximation of the widths of variables to the nearest next power of two is a small fraction compared to the total number of bits in use (≈13%). The main advantage of this representation is that it leads to optimal variable packing in polynomial time; (c) Combined Packing and Coalescing - we discuss the importance of coalescing (combining variables whose live ranges do not interfere) in the context of variable packing and present an iterative algorithm to perform coalescing and packing of W-SSA variables represented in PoTR. Our experimental results show up to 76.00% decrease in the number of variables compared to the number of variables in the input program in Single Static Assignment (SSA) form. This reduction in the number of variables led to a significant reduction in dynamic spilling, packing, and unpacking instructions. © 2013 ACM.
About the journal
JournalTransactions on Architecture and Code Optimization
ISSN15443566
Open AccessYes
Concepts (14)
  •  related image
    Approximate solution
  •  related image
    COMBINED PACKING AND COALESCING
  •  related image
    Embedded processors
  •  related image
    GENERAL PURPOSE PROCESSORS
  •  related image
    Iterative algorithm
  •  related image
    Memory requirements
  •  related image
    REGISTER ALLOCATION
  •  related image
    STATIC SINGLE ASSIGNMENTS
  •  related image
    Algorithms
  •  related image
    Computational complexity
  •  related image
    General purpose computers
  •  related image
    Optimization
  •  related image
    Polynomial approximation
  •  related image
    Flocculation