X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Ffunccall.h;h=2db2aaf83b94ff74f2c1bd2e865bacb18f1781a2;hb=561fb267e85f6f65eadabb9fb1d647a56248b881;hp=c5c709f323c28ae552483084a9909863b9eb1c91;hpb=63eda4e17ebee2a6ab7520d0559ddac0223607d7;p=libfirm diff --git a/ir/opt/funccall.h b/ir/opt/funccall.h index c5c709f32..2db2aaf83 100644 --- a/ir/opt/funccall.h +++ b/ir/opt/funccall.h @@ -20,9 +20,9 @@ #define _FUNCCALL_H_ /** - * Optimize function calls by handling real functions. + * Optimize function calls by handling const functions. * - * This optimization first detects all "real functions", i.e., + * This optimization first detects all "const functions", i.e., * IR graphs that neither read nor write memory (and hence did * not create exceptions, as these use memory in Firm). * @@ -35,8 +35,23 @@ * Anyway, it might be good for handling builtin's or pseudo-graphs, * even if the later read/write memory (but we know how). * + * This optimizations read the irg_const_function property of + * entities and and sets the irg_const_function property of + * graphs. + * * If callee information is valid, we also optimize polymorphic Calls. + * + * @param force_run if set, an optimization run is startet even + * if no const function graph was detected. + * Else calls are only optimized if at least one + * const function graph was detected. + * + * If the fontend created external entities with irg_const_function + * property set, the force_run parameter should be set, else + * should be unset. + * + * @note This optimization destroys the link fields of nodes. */ -void optimize_funccalls(void); +void optimize_funccalls(int force_run); #endif /* _FUNCCALL_H_ */