Contification using dominators

Authors
Citation
M. Fluet et S. Weeks, Contification using dominators, ACM SIGPL N, 36(10), 2001, pp. 2-13
Citations number
25
Categorie Soggetti
Computer Science & Engineering
Journal title
ACM SIGPLAN NOTICES
ISSN journal
15232867 → ACNP
Volume
36
Issue
10
Year of publication
2001
Pages
2 - 13
Database
ISI
SICI code
1523-2867(200110)36:10<2:CUD>2.0.ZU;2-0
Abstract
Contification is a compiler optimization that turns a function that always returns to the same place into a continuation. Compilers for functional lan guages use contification to expose the control-flow information that is req uired by many optimizations, including traditional loop optimizations. This paper gives a formal presentation of contification in MLton, a whole-p rogram optimizing Standard ML compiler. We present two existing algorithms for contification in our framework, as well as a new algorithm based on the dominator tree of a program's call graph. We prove that the dominator algo rithm is optimal. We present benchmark results on realistic SML programs de monstrating that contification has minimal overhead on compile time and sig nificantly improves run time.