summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bearch.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2014-10-16 14:04:59 +0200
committerMatthias Braun <matze@braunis.de>2014-10-18 20:42:45 +0200
commit6c716ff967463ec03152cf382bd3e7fb5782f042 (patch)
tree7243609729cdd003842c87a31b8566d5f341a129 /ir/be/bearch.c
parent85b6b1a33436665b29512d6b885a59bc8ea5a913 (diff)
move arch_dump functions to be_dump
Diffstat (limited to 'ir/be/bearch.c')
-rw-r--r--ir/be/bearch.c110
1 files changed, 0 insertions, 110 deletions
diff --git a/ir/be/bearch.c b/ir/be/bearch.c
index 8937b98..d2b7252 100644
--- a/ir/be/bearch.c
+++ b/ir/be/bearch.c
@@ -149,116 +149,6 @@ bool arch_reg_is_allocatable(const arch_register_req_t *req,
return true;
}
-/**
- * Print information about a register requirement in human readable form
- * @param F output stream/file
- * @param req The requirements structure to format.
- */
-static void arch_dump_register_req(FILE *const F, arch_register_req_t const *const req)
-{
- if (req == NULL || req->type == arch_register_req_type_none) {
- fprintf(F, "n/a");
- return;
- }
-
- fprintf(F, "%s", req->cls->name);
-
- if (arch_register_req_is(req, limited)) {
- unsigned n_regs = req->cls->n_regs;
- unsigned i;
-
- fprintf(F, " limited to");
- for (i = 0; i < n_regs; ++i) {
- if (rbitset_is_set(req->limited, i)) {
- const arch_register_t *reg = &req->cls->regs[i];
- fprintf(F, " %s", reg->name);
- }
- }
- }
-
- if (arch_register_req_is(req, should_be_same)) {
- const unsigned other = req->other_same;
- int i;
-
- fprintf(F, " same as");
- for (i = 0; 1U << i <= other; ++i) {
- if (other & (1U << i)) {
- ir_fprintf(F, " #%d", i);
- }
- }
- }
-
- if (arch_register_req_is(req, must_be_different)) {
- const unsigned other = req->other_different;
- int i;
-
- fprintf(F, " different from");
- for (i = 0; 1U << i <= other; ++i) {
- if (other & (1U << i)) {
- ir_fprintf(F, " #%d", i);
- }
- }
- }
-
- if (req->width != 1) {
- fprintf(F, " width:%d", req->width);
- }
- if (arch_register_req_is(req, aligned)) {
- fprintf(F, " aligned");
- }
- if (arch_register_req_is(req, ignore)) {
- fprintf(F, " ignore");
- }
- if (arch_register_req_is(req, produces_sp)) {
- fprintf(F, " produces_sp");
- }
-}
-
-void arch_dump_reqs_and_registers(FILE *F, const ir_node *node)
-{
- backend_info_t *const info = be_get_info(node);
- /* don't fail on invalid graphs */
- if (!info || (!info->in_reqs && get_irn_arity(node) != 0) || !info->out_infos) {
- fprintf(F, "invalid register requirements!!!\n");
- return;
- }
-
- foreach_irn_in(node, i, op) {
- const arch_register_req_t *req = arch_get_irn_register_req_in(node, i);
- fprintf(F, "inreq #%d = ", i);
- arch_dump_register_req(F, req);
- arch_register_t const *const reg = be_get_info(skip_Proj_const(op))->out_infos ? arch_get_irn_register(op) : NULL;
- fprintf(F, " [%s]\n", reg ? reg->name : "n/a");
- }
- be_foreach_out(node, o) {
- const arch_register_req_t *req = arch_get_irn_register_req_out(node, o);
- fprintf(F, "outreq #%u = ", o);
- arch_dump_register_req(F, req);
- const arch_register_t *reg = arch_get_irn_register_out(node, o);
- fprintf(F, " [%s]\n", reg != NULL ? reg->name : "n/a");
- }
-
- fprintf(F, "flags =");
- arch_irn_flags_t flags = arch_get_irn_flags(node);
- if (flags == arch_irn_flags_none) {
- fprintf(F, " none");
- } else {
- if (flags & arch_irn_flag_dont_spill)
- fprintf(F, " unspillable");
- if (flags & arch_irn_flag_rematerializable)
- fprintf(F, " remat");
- if (flags & arch_irn_flag_modify_flags)
- fprintf(F, " modify_flags");
- if (flags & arch_irn_flag_simple_jump)
- fprintf(F, " simple_jump");
- if (flags & arch_irn_flag_not_scheduled)
- fprintf(F, " not_scheduled");
- if (flags & arch_irn_flag_schedule_first)
- fprintf(F, " schedule_first");
- }
- fprintf(F, " (0x%x)\n", (unsigned)flags);
-}
-
void be_make_start_mem(be_start_info_t *const info, ir_node *const start, unsigned const pos)
{
info->pos = pos;