From 02d622737e32449cfbff825093b14cdce17b38cd Mon Sep 17 00:00:00 2001 From: Andreas Zwinkau Date: Wed, 16 Mar 2011 13:30:36 +0100 Subject: [PATCH] Adapt documentation to implementation Depending on definitions there is 0,1, or many immediate postdominators in an endless loop. Our implementation also walks Keep edges, so there is 1 postdominator. --- include/libfirm/irdom.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/libfirm/irdom.h b/include/libfirm/irdom.h index 9ccf2a8ce..aae72931d 100644 --- a/include/libfirm/irdom.h +++ b/include/libfirm/irdom.h @@ -32,6 +32,9 @@ * - dom_depth: a number giving the depth of the block in the dominator * tree. * - pre_num: Number in preorder traversal. + * + * We generally presume (like Tarjan) that endless loops do not exist. The + * implementation assumes a control dependency from End to loop header. */ #ifndef FIRM_ANA_IRDOM_H #define FIRM_ANA_IRDOM_H @@ -59,8 +62,6 @@ FIRM_API void set_Block_dom_pre_num(ir_node *bl, int num); * * These routines only work properly if the ir_graph is in state * dom_consistent or dom_inconsistent. - * - * If the block is not reachable from End, returns a Bad node. */ FIRM_API ir_node *get_Block_ipostdom(const ir_node *bl); FIRM_API void set_Block_ipostdom(ir_node *bl, ir_node *n); -- 2.20.1