arXiv.itsnick.co

an independent field guide to 23 million papers from arXiv & OpenAlex — not affiliated with arXiv.org

Computer Science · Hardware and Architecture

Denotational Semantics for SSA Conversion

Sebastian Pop, Albert Cohen, Pierre Jouvelot, Georges-André Silber

See on the map

Abstract

We present the first formal specification of the SSA form, an in termediate code representation language used in most modern compilers such as GCC or Intel CC, and of its conversion process from imperative languages. More specifically, we provide (1) a denotational semantics o f the SSA, the Static Single Assignment form, (2) a collecting denotational semantics for a Turing-complete imperative language Imp, (3) a non-standard denotational semantics specifying the conversion of Imp to SSA and, most importantly, (4) the proof of the consistency of this transformation, showing that the structur e of the memory states manipulated by imperative constructs is preserved in compilers’ middle ends that use the SSA form as control-flow data representation. Interestingly, as an unexpected theo retical byproduct of our conversion procedure, we offer a new proof of the reducibility of the RAM computing model to the domain of Kleene’s partial recursive functions, to which SSA is strongly related. These fundamental results ensure that the widely used SSA technology is sound. Our formal denotational framework further suggests that the SSA form could become a target of choice for other optimization technologies such as abstract interpre tation or partial evaluation. Indeed, since the SSA form is languageindependent, the resulting optimizations would be automatically enabled for any source language supported by compilers such as GCC.

More like this