X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Ffunccall.h;h=776ed9046831774f6e17c45da5cb46c407d05acb;hb=6ec69d327b9bfd952743fd8ebc7848690cacaa18;hp=c5c709f323c28ae552483084a9909863b9eb1c91;hpb=63eda4e17ebee2a6ab7520d0559ddac0223607d7;p=libfirm diff --git a/ir/opt/funccall.h b/ir/opt/funccall.h index c5c709f32..776ed9046 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,21 @@ * 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. */ -void optimize_funccalls(void); +void optimize_funccalls(int force_run); #endif /* _FUNCCALL_H_ */