summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2019-03-03 10:23:03 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2019-03-04 20:53:43 +0100
commit5908f00715b2613458caae67fa613e8537120ad8 (patch)
tree689d6a1b45189f941a641f0bcf4690dd701a5934
parentc8cf8d509fd41d301541a5e24ad6f19672a7e9af (diff)
beasm: Do not calculate additional pressure for register classes with manual register allocation.
-rw-r--r--ir/be/beasm.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/ir/be/beasm.c b/ir/be/beasm.c
index 7b2e5b0..0221f1d 100644
--- a/ir/be/beasm.c
+++ b/ir/be/beasm.c
@@ -311,17 +311,21 @@ ir_node *be_make_asm(ir_node const *const node, be_asm_info_t const *const info,
bitset_t *const used_ins = bitset_alloca(n_ins);
for (size_t o = pn_be_Asm_first_out; o < n_outs; ++o) {
arch_register_req_t const *const outreq = out_reqs[o];
- assert(outreq->cls->index < ARRAY_SIZE(add_pressure));
- if (!match_requirement(in_reqs, n_ins, used_ins, outreq))
- add_pressure[outreq->cls->index]++;
+ if (!outreq->cls->manual_ra) {
+ assert(outreq->cls->index < ARRAY_SIZE(add_pressure));
+ if (!match_requirement(in_reqs, n_ins, used_ins, outreq))
+ add_pressure[outreq->cls->index]++;
+ }
}
} else {
bitset_t *const used_outs = bitset_alloca(n_outs);
for (unsigned i = n_be_Asm_first_in; i < n_ins; ++i) {
arch_register_req_t const *const inreq = in_reqs[i];
- assert(inreq->cls->index < ARRAY_SIZE(add_pressure));
- if (!match_requirement(out_reqs, n_outs, used_outs, inreq))
- add_pressure[inreq->cls->index]++;
+ if (!inreq->cls->manual_ra) {
+ assert(inreq->cls->index < ARRAY_SIZE(add_pressure));
+ if (!match_requirement(out_reqs, n_outs, used_outs, inreq))
+ add_pressure[inreq->cls->index]++;
+ }
}
}