Source Code Analysis and Manipulation, Fourth IEEE International Workshop on (SCAM'04)
Control Flow Reversal for Adjoint Code Generation
Chicago, Illinois
September 15-September 16
ISBN: 0-7695-2144-4
Jean Utke, Argonne National Laboratory, IL, USA
We describe an approach to the reversal of the control flow of structured programs. It is used to automatically generate adjoint code for numerical programs by semantic source transformation. After a short introduction to applications and the implementation tool set, we describe the building blocks using a simple example. We then illustrate the code reversal within basic blocks. The main part of the paper covers the reversal of structured control flow graphs. We show the algorithmic steps for simple branches and loops and give a detailed algorithm for the reversal of arbitrary combinations of loops and branches in a general control flow graph.
Citation:
Uwe Naumann, Jean Utke, Andrew Lyons, Michael Fagan, "Control Flow Reversal for Adjoint Code Generation," scam, pp.55-64, Source Code Analysis and Manipulation, Fourth IEEE International Workshop on (SCAM'04), 2004