summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beemitter.c
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2014-10-27 12:28:08 +0100
committerChristoph Mallon <mallon@cs.uni-saarland.de>2014-10-27 14:56:58 +0100
commitcd6c34f1fed71c52db2c7520ee50a42fcb8b83b6 (patch)
tree9b4469a980f666c967352d134add114944e7304a /ir/be/beemitter.c
parent3e20b1bdcdbfab2f0df2b76e3ca28155cc78fef0 (diff)
be: Factorise code to initialise emitters.
All backends emit nothing for Phis and be_Keeps, so set this centrally.
Diffstat (limited to 'ir/be/beemitter.c')
-rw-r--r--ir/be/beemitter.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ir/be/beemitter.c b/ir/be/beemitter.c
index 3a797f1..17ce2dd 100644
--- a/ir/be/beemitter.c
+++ b/ir/be/beemitter.c
@@ -11,6 +11,7 @@
*/
#include "bedwarf.h"
#include "beemitter.h"
+#include "benode.h"
#include "be_t.h"
#include "panic.h"
#include "irnode_t.h"
@@ -81,6 +82,13 @@ void be_emit_finish_line_gas(const ir_node *node)
be_emit_write_line();
}
+void be_init_emitters(void)
+{
+ ir_clear_opcodes_generic_func();
+ be_set_emitter(op_Phi, be_emit_nothing);
+ be_set_emitter(op_be_Keep, be_emit_nothing);
+}
+
void be_emit_nothing(ir_node const *const node)
{
(void)node;