* Heuristic inliner. Calculates a benefice value for every call and inlines
* those calls with a value higher than the threshold.
*
+ * @param maxsize Do not inline any calls if a method has more than
+ * maxsize firm nodes. It may reach this limit by
+ * inlineing.
* @param threshold inlining threshold
*/
-void inline_functions(int inline_threshold);
+void inline_functions(int maxsize, int inline_threshold);
/** Code Placement.
*
* Heuristic inliner. Calculates a benifice value for every call and inlines
* those calls with a value higher than the threshold.
*/
-void inline_functions(int inline_threshold) {
+void inline_functions(int maxsize, int inline_threshold) {
inline_irg_env *env;
int i, n_irgs;
ir_graph *rem;
int benefice;
unsigned local_adr;
+ if (env->n_nodes > maxsize) break;
+
call = entry->call;
callee = entry->callee;