- BugFix: kill partitions with 0 blocks either
[libfirm] / include / libfirm / iroptimize.h
index 5f43526..f5aedd5 100644 (file)
@@ -63,8 +63,10 @@ void opt_bool(ir_graph *irg);
  * Try to reduce the number of conv nodes in the given ir graph.
  *
  * @param irg  the graph
+ *
+ * @return non-zero if the optimization could be applied, 0 else
  */
-void conv_opt(ir_graph *irg);
+int conv_opt(ir_graph *irg);
 
 /**
  * Do the scalar replacement optimization.
@@ -235,8 +237,10 @@ ir_node *can_replace_load_by_const(const ir_node *load, ir_node *c);
  *
  * Store after Load: A Store after a Load is removed, if the
  *   Store doesn't have an exception handler.
+ *
+ * @return non-zero if the optimization could be applied, 0 else
  */
-void optimize_load_store(ir_graph *irg);
+int optimize_load_store(ir_graph *irg);
 
 /**
  * Do Loop unrolling in the given graph.
@@ -372,9 +376,9 @@ void proc_cloning(float threshold);
  * See Muchnik 12.3.1 Algebraic Simplification and Reassociation of
  * Addressing Expressions.
  *
- *
+ * @return non-zero if the optimization could be applied, 0 else
  */
-void optimize_reassociation(ir_graph *irg);
+int optimize_reassociation(ir_graph *irg);
 
 /**
  * Normalize the Returns of a graph by creating a new End block
@@ -579,17 +583,27 @@ void inline_small_irgs(ir_graph *irg, int size);
  *  @param ignore_runtime  count a function only calling runtime functions as
  *                         leave
  */
-void inline_leave_functions(int maxsize, int leavesize, int size, int ignore_runtime);
+void inline_leave_functions(unsigned maxsize, unsigned leavesize,
+               unsigned size, int ignore_runtime);
 
 /**
  * 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
+ * @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 maxsize, int inline_threshold);
+void inline_functions(unsigned maxsize, int inline_threshold);
+
+/**
+ * Combines congruent end blocks into one.
+ *
+ * @param irg   The IR-graph to optimize.
+ *
+ * @return non-zero if the graph was transformed
+ */
+int melt_end_blocks(ir_graph *irg);
 
 #endif