/*
- * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2011 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* @brief Removal of unreachable methods.
* @author Hubert Schmid
* @date 09.06.2002
- * @version $Id$
- * @summary
- * (TODO: translate to english)
- * Entfernen von nicht erreichbaren (aufrufbaren) Methoden. Die Menge
- * der nicht erreichbaren Methoden wird aus der Abschätzung der
- * Aufrufrelation bestimmt.
+ * @brief
+ * Removal of unreachable methods. The set of unreachable methods is computed
+ * by the callgraph.
*/
#ifndef FIRM_IR_ICGOPT_H
#define FIRM_IR_ICGOPT_H
+#include <stddef.h>
+
#include "firm_types.h"
+#include "begin.h"
+
+/**
+ * Removes all methods which are not reachable from "keep_arr".
+ *
+ * Frees all interprocedural loop information.
+ */
+FIRM_API void gc_irgs(size_t n_keep, ir_entity *keep_arr[]);
-/* Entfernt alle Methoden, die von den Methoden aus "keep_arr"
- * (bezgl. der Abschaetzung get_Call_callee) nicht erreichbar sind. Die
- * Abschaetzung der Aufrufrelation muss entsprechend an den
- * Call-Operationen gespeichert sein. Die "entity->link"s werden dabei
- * ueberschrieben.
+/**
+ * Creates an ir_prog pass for gc_irgs().
*
- * Frees all interprocedural loop information. */
-void gc_irgs(int n_keep, ir_entity *keep_arr[]);
+ * @param name the name of this pass or NULL
+ * @return the newly created ir_graph pass
+ */
+FIRM_API ir_prog_pass_t *gc_irgs_pass(const char *name);
+
+#include "end.h"
#endif