From: Götz Lindenmaier Date: Thu, 9 Jan 2003 16:57:20 +0000 (+0000) Subject: Added functiuon "remove critical edges" to be implemented. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=7c628e72d36fb4e6042d93679383b83a41fc233d;p=libfirm Added functiuon "remove critical edges" to be implemented. [r588] --- diff --git a/ir/ir/irgopt.c b/ir/ir/irgopt.c index cb8a73154..6f0f7389b 100644 --- a/ir/ir/irgopt.c +++ b/ir/ir/irgopt.c @@ -1453,3 +1453,12 @@ void optimize_cf(ir_graph *irg) { current_ir_graph = rem; } + +/* Placed an empty basic block on critical control flow edges thereby + removing them. + A critical control flow edge is an edge from a block with several + control exits to a block with several control entries (See Muchnic + p. 407). */ +void remove_critical_cf_edges(ir_graph *irg) { + printf("WARNING: called unimplemented function!!!\n"); +} diff --git a/ir/ir/irgopt.h b/ir/ir/irgopt.h index f03fceec8..6817c69b6 100644 --- a/ir/ir/irgopt.h +++ b/ir/ir/irgopt.h @@ -81,10 +81,11 @@ void inline_small_irgs(ir_graph *irg, int size); in state dom_consistent. Destroys the out information as it moves nodes to other blocks. Optimizes Tuples in Control edges. (@@@ This is not tested!) + Call remove_critical_cf_edges() before place_code(). This normalizes + the control flow graph so that for all operations a basic block exists + where they can be optimally placed. @@@ A more powerful code placement would move operations past Phi nodes - out of loops. Further the control flow should be normalized before - computing the dominator information so that there exists an optimal block - for all operations. */ + out of loops. */ void place_code(ir_graph *irg); /********************************************************************/ @@ -100,4 +101,12 @@ void place_code(ir_graph *irg); /********************************************************************/ void optimize_cf(ir_graph *irg); +/* Places an empty basic block on critical control flow edges thereby + removing them. + A critical control flow edge is an edge from a block with several + control exits to a block with several control entries (See Muchnic + p. 407). + @@@ not yet implemented!!! */ +void remove_critical_cf_edges(ir_graph *irg); + # endif /* _IRGOPT_H_ */