summaryrefslogtreecommitdiffhomepage
path: root/ir/be/riscv/riscv_finish.c
diff options
context:
space:
mode:
authorJohannes Bucher <johannes.bucher2@student.kit.edu>2019-05-17 14:45:59 +0200
committerJohannes Bucher <johannes.bucher2@student.kit.edu>2019-05-17 14:45:59 +0200
commit5d8d3b233eb47bf1c317c7c822983d5524535653 (patch)
tree021cfb02cd572d7cfde4e2c07fd70535c96f124f /ir/be/riscv/riscv_finish.c
parent0b22246bd37ea4d4fb772caf659fa7d449571e3a (diff)
riscv: do not emit IncSP nodes with offset 0
Diffstat (limited to 'ir/be/riscv/riscv_finish.c')
-rw-r--r--ir/be/riscv/riscv_finish.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ir/be/riscv/riscv_finish.c b/ir/be/riscv/riscv_finish.c
index e434878..81a7b39 100644
--- a/ir/be/riscv/riscv_finish.c
+++ b/ir/be/riscv/riscv_finish.c
@@ -117,11 +117,16 @@ static void finish_be_IncSP(ir_node *node)
}
}
+static void peephole_be_IncSP(ir_node *const node)
+{
+ be_peephole_IncSP_IncSP(node);
+}
+
void riscv_finish_graph(ir_graph *irg)
{
/* perform peephole optimizations */
ir_clear_opcodes_generic_func();
-
+ register_peephole_optimization(op_be_IncSP, peephole_be_IncSP);
be_peephole_opt(irg);
/* perform legalizations (mostly fix nodes with too big immediates) */