ControlFlow.xcc

Nikola Puzovic (nikola.puzovicst.com). Benoit Dupont de Dinechin (Benoit.Dupont-de-Dinechinst.com).

Copyright 2002 - 2007 STMicroelectronics. Copyright 1995 - 1998 Commissariat a l'Energie Atomique.

This program is free software; you can redistribute it and/or modify it under the terms of either (at your option): the GNU General Public License (GPL) version 2; the GNU Lesser General Public License (LGPL) version 2.1; any later version of these licences as published by the Free Software Foundation.

ControlFlow— Control flow analysis and optimizations.
struct ControlFlow_;
ControlFlow_memory— This ControlFlow Memory.
Memory
ControlFlow_memory(ControlFlow this);
ControlFlow_codeRegion— This ControlFlow CodeRegion.
CodeRegion
ControlFlow_codeRegion(ControlFlow this);
ControlFlow_pretty— Pretty-print this ControlFlow.
bool
ControlFlow_pretty(ControlFlow this, FILE *file);

ControlFlow_clean -- CLEAN algorithm.

void
ControlFlow_checkCFGsanity(ControlFlow this, bool is_initializer);

ControlFlow_clean -- CLEAN algorithm.

void
ControlFlow_clean(ControlFlow this);

ControlFlow_eliminate -- Eliminate dead code.

void
ControlFlow_eliminate(ControlFlow this);

ControlFlow_bottomUpOrderCode -- Pettis-Hansen profile guided code positioning.

void
ControlFlow_bottomUpOrderCode(ControlFlow this);

This function performs code positioning by creating block chains (standard Pettis-Hansen approach) and by giving priority according to reverse post-order.

void
ControlFlow_bottomUpPostorder(ControlFlow this);

ControlFlow_reversePostOrderCode -- reverse postorder code positioning.

void
ControlFlow_reversePostOrderCode(ControlFlow this);

ControlFlow_makeDummyEdgeFrequencies(ControlFlow this)

void
ControlFlow_makeDummyEdgeProbabilities(ControlFlow this);

ControlFlow_computeBlockFrequency().

Computes frequency of all blocks and edges in a CFG.

Input : CFG that has all edge probabilities properly set up

void
ControlFlow_computeBlockFrequency(ControlFlow this);