X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Fcgana.h;h=ca85bd75cfab0bf1fc32a98f75b55e938d6696e6;hb=4bad1346ff2abc3923beea23e5ac949acc7ca514;hp=9c78b7584225f08b8a2d423fd9f37fe218b42197;hpb=35f22592a783163c78531bf4ab1a2556add3fa38;p=libfirm diff --git a/ir/ana/cgana.h b/ir/ana/cgana.h index 9c78b7584..ca85bd75c 100644 --- a/ir/ana/cgana.h +++ b/ir/ana/cgana.h @@ -55,22 +55,29 @@ * and Craig Chambers. * * Performs some optimizations possible by the analysed information: - * - Replace SymConst nodes by Const nodes if possible, - * - Replace (Sel-method(Alloc)) by Const method, - * - Replaces unreachable Sel nodes by Bad (@@@ was genau meint unreachable?) - * - Replaces Sel-method by Const if the Method is never overwritten */ -/* @@@ I assume this can not be called via JNI :-( -- how to obtain the array pointer? */ -void cgana(int *len, entity ***free_methods, int whole); + * - Replace SymConst-name nodes by SymConst-entity nodes if possible. + * - Replace (Sel-method(Alloc)) by SymConst-entity. + * - Replaces Sel nodes by Bad if there is no implementation for the + * selected entity. (@@@ was genau meint unreachable?) + * - Replaces Sel-method by SymConst-entity if the method is never overwritten. + * - Replaces Calls by Tuple containing Bads if callee array is empty + * (there is no implementation to call) + * + * Leaves Bad control predecessors in the graph! + */ +void cgana(int *len, entity ***free_methods); /** Free callee information. * - * Sets callee_info_state of the graph passed to none. + * Sets callee_info_state of the graph passed to none. Sets callee field + * in all call nodes to NULL. Else it happens that the field contains + * pointers to other than firm arrays. */ void free_callee_info(ir_graph *irg); /* Optimize the address expressions passed to call nodes. * Performs only the optimizations done by cgana. */ -/* @@@ move to irgopt ?! */ -/* @@@ not fully implemented as buggy !!! */ void opt_call_addrs(void); + + #endif /* _CGANA_H_ */