summaryrefslogtreecommitdiffhomepage
path: root/ir/be/riscv
diff options
context:
space:
mode:
authorJohannes Bucher <johannes.bucher2@student.kit.edu>2019-06-19 16:08:39 +0200
committerJohannes Bucher <johannes.bucher2@student.kit.edu>2019-06-19 16:08:39 +0200
commitf23992550ddcb25905fdc81a3c7fbbb39f5e94ce (patch)
tree60fac635ffb0f7e5376d1c7a6d492b9dcf4e8010 /ir/be/riscv
parent201602dcf9059d2353443caa521289496eff0216 (diff)
riscv: lower aggregate types at calls by replacing them with a pointer to the actual data
Diffstat (limited to 'ir/be/riscv')
-rw-r--r--ir/be/riscv/riscv_bearch.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ir/be/riscv/riscv_bearch.c b/ir/be/riscv/riscv_bearch.c
index 0d6f291..4b0b1d9 100644
--- a/ir/be/riscv/riscv_bearch.c
+++ b/ir/be/riscv/riscv_bearch.c
@@ -23,8 +23,9 @@
#include "irgwalk.h"
#include "irprog_t.h"
#include "irprintf.h"
-#include "lower_builtins.h"
#include "lower_alloc.h"
+#include "lower_builtins.h"
+#include "lower_calls.h"
#include "lowering.h"
#include "riscv_emitter.h"
#include "riscv_lower64.h"
@@ -397,6 +398,11 @@ static void riscv_lower_for_target(void)
ir_arch_lower(&riscv_arch_dep);
be_after_irp_transform("lower-arch-dep");
+ lower_calls_with_compounds(LF_RETURN_HIDDEN,
+ lower_aggregates_as_pointers, NULL,
+ lower_aggregates_as_pointers, NULL,
+ reset_stateless_abi);
+
foreach_irp_irg(i, irg) {
lower_CopyB(irg, 16, 17, false);
be_after_transform(irg, "lower-copyb");