Integrated Register Allocation and Instruction Scheduling with Constraint Programming

This dissertation proposes a combinatorial model, program representations, and constraint solving techniques for integrated register allocation and instruction scheduling in compiler back-ends. In contrast to traditional compilers based on heuristics, the proposed approach generates potentially opti...

Full description

Bibliographic Details
Main Author: Castañeda Lozano, Roberto
Format: Others
Language:English
Published: KTH, Programvaruteknik och Datorsystem, SCS 2014
Subjects:
Online Access:http://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-154599
http://nbn-resolving.de/urn:isbn:978-91-7595-311-3
id ndltd-UPSALLA1-oai-DiVA.org-kth-154599
record_format oai_dc
spelling ndltd-UPSALLA1-oai-DiVA.org-kth-1545992018-01-12T05:09:20ZIntegrated Register Allocation and Instruction Scheduling with Constraint ProgrammingengCastañeda Lozano, RobertoKTH, Programvaruteknik och Datorsystem, SCSSICS (Swedish Institute of Computer Science) and KTH (Royal Institute of Technology)Stockholm, Sweden2014Computer SciencesDatavetenskap (datalogi)This dissertation proposes a combinatorial model, program representations, and constraint solving techniques for integrated register allocation and instruction scheduling in compiler back-ends. In contrast to traditional compilers based on heuristics, the proposed approach generates potentially optimal code by considering all trade-offs between interdependent decisions as a single optimization problem. The combinatorial model is the first to handle a wide array of global register allocation subtasks, including spill code optimization, ultimate coalescing, register packing, and register bank assignment, as well as instruction scheduling for Very Long Instruction Word (VLIW) processors. The model is based on three novel, complementary program representations: Linear Static Single Assignment for global register allocation; copy extension for spilling, basic coalescing, and register bank assignment; and alternative temporaries for spill code optimization and ultimate coalescing. Solving techniques are proposed that exploit the program representation properties for scalability. The model, program representations, and solving techniques are implemented in Unison, a code generator that delivers potentially optimal code while scaling to medium-size functions. Thorough experiments show that Unison: generates faster code (up to 41% with a mean improvement of 7%) than LLVM (a state-of-the-art compiler) for Hexagon (a challenging VLIW processor), generates code that is competitive with LLVM for MIPS32 (a simpler RISC processor), is robust across different benchmarks such as MediaBench and SPECint 2006, scales up to medium-size functions of up to 1000 instructions, and adapts easily to different optimization criteria. The contributions of this dissertation are significant. They lead to a combinatorial approach for integrated register allocation and instruction scheduling that is, for the first time, practical (it robustly scales to medium-size functions) and effective (it yields better code than traditional heuristic approaches). <p>QC 20141117</p>Licentiate thesis, comprehensive summaryinfo:eu-repo/semantics/masterThesistexthttp://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-154599urn:isbn:978-91-7595-311-3TRITA-ICT-ECS AVH, 1653-6363 ; 14:13application/pdfinfo:eu-repo/semantics/openAccess
collection NDLTD
language English
format Others
sources NDLTD
topic Computer Sciences
Datavetenskap (datalogi)
spellingShingle Computer Sciences
Datavetenskap (datalogi)
Castañeda Lozano, Roberto
Integrated Register Allocation and Instruction Scheduling with Constraint Programming
description This dissertation proposes a combinatorial model, program representations, and constraint solving techniques for integrated register allocation and instruction scheduling in compiler back-ends. In contrast to traditional compilers based on heuristics, the proposed approach generates potentially optimal code by considering all trade-offs between interdependent decisions as a single optimization problem. The combinatorial model is the first to handle a wide array of global register allocation subtasks, including spill code optimization, ultimate coalescing, register packing, and register bank assignment, as well as instruction scheduling for Very Long Instruction Word (VLIW) processors. The model is based on three novel, complementary program representations: Linear Static Single Assignment for global register allocation; copy extension for spilling, basic coalescing, and register bank assignment; and alternative temporaries for spill code optimization and ultimate coalescing. Solving techniques are proposed that exploit the program representation properties for scalability. The model, program representations, and solving techniques are implemented in Unison, a code generator that delivers potentially optimal code while scaling to medium-size functions. Thorough experiments show that Unison: generates faster code (up to 41% with a mean improvement of 7%) than LLVM (a state-of-the-art compiler) for Hexagon (a challenging VLIW processor), generates code that is competitive with LLVM for MIPS32 (a simpler RISC processor), is robust across different benchmarks such as MediaBench and SPECint 2006, scales up to medium-size functions of up to 1000 instructions, and adapts easily to different optimization criteria. The contributions of this dissertation are significant. They lead to a combinatorial approach for integrated register allocation and instruction scheduling that is, for the first time, practical (it robustly scales to medium-size functions) and effective (it yields better code than traditional heuristic approaches). === <p>QC 20141117</p>
author Castañeda Lozano, Roberto
author_facet Castañeda Lozano, Roberto
author_sort Castañeda Lozano, Roberto
title Integrated Register Allocation and Instruction Scheduling with Constraint Programming
title_short Integrated Register Allocation and Instruction Scheduling with Constraint Programming
title_full Integrated Register Allocation and Instruction Scheduling with Constraint Programming
title_fullStr Integrated Register Allocation and Instruction Scheduling with Constraint Programming
title_full_unstemmed Integrated Register Allocation and Instruction Scheduling with Constraint Programming
title_sort integrated register allocation and instruction scheduling with constraint programming
publisher KTH, Programvaruteknik och Datorsystem, SCS
publishDate 2014
url http://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-154599
http://nbn-resolving.de/urn:isbn:978-91-7595-311-3
work_keys_str_mv AT castanedalozanoroberto integratedregisterallocationandinstructionschedulingwithconstraintprogramming
_version_ 1718604729329647616