beifg: Factorise code to count interference components.
[libfirm] / ir / be / beemitter.c
index a08461d..31229b7 100644 (file)
@@ -1,20 +1,6 @@
 /*
- * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
- *
  * This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
+ * Copyright (C) 2012 University of Karlsruhe.
  */
 
 /**
  */
 #include "config.h"
 
+#include "bedwarf.h"
 #include "beemitter.h"
 #include "be_t.h"
+#include "error.h"
 #include "irnode_t.h"
 #include "irprintf.h"
 #include "ident.h"
@@ -108,3 +96,17 @@ void be_emit_finish_line_gas(const ir_node *node)
        be_emit_cstring(" */\n");
        be_emit_write_line();
 }
+
+void be_emit_nothing(ir_node const *const node)
+{
+       (void)node;
+}
+
+void be_emit_node(ir_node const *const node)
+{
+       be_dwarf_location(get_irn_dbg_info(node));
+       ir_op     *const op   = get_irn_op(node);
+       emit_func *const emit = get_generic_function_ptr(emit_func, op);
+       DEBUG_ONLY(if (!emit) panic("no emit handler for node %+F (%+G, graph %+F)\n", node, node, get_irn_irg(node));)
+       emit(node);
+}