void dump::dump_rels(vvec & vv) { for(vvec::iterator I = vv.begin(), E = vv.end(); I != E; ++I) { value *v = *I; if (!v || !v->is_rel()) continue; sblog << "\n\t\t\t\t\t"; sblog << " rels: " << *v << " : "; dump_vec(v->mdef); sblog << " <= "; dump_vec(v->muse); } }
void ssa_rename::rename_src_vec(node *n, vvec &vv, bool src) { for(vvec::iterator I = vv.begin(), E = vv.end(); I != E; ++I) { value* &v = *I; if (!v || v->is_readonly()) continue; if (v->is_rel()) { if (!v->rel->is_readonly()) v->rel = rename_use(n, v->rel); rename_src_vec(n, v->muse, true); } else if (src) v = rename_use(n, v); } }
void dump::dump_vec(const vvec & vv) { bool first = true; for(vvec::const_iterator I = vv.begin(), E = vv.end(); I != E; ++I) { value *v = *I; if (!first) sblog << ", "; else first = false; if (v) { sblog << *v; } else { sblog << "__"; } } }
void ssa_rename::rename_dst_vec(node *n, vvec &vv, bool set_def) { for(vvec::iterator I = vv.begin(), E = vv.end(); I != E; ++I) { value* &v = *I; if (!v) continue; if (v->is_rel()) { rename_dst_vec(n, v->mdef, false); } else { v = rename_def(n, v); if (set_def) v->def = n; } } }
void ra_checker::check_src_vec(node *n, unsigned id, vvec &vv, bool src) { for (vvec::iterator I = vv.begin(), E = vv.end(); I != E; ++I) { value *v = *I; if (!v || !v->is_sgpr()) continue; if (v->is_rel()) { if (!v->rel) { sb_ostringstream o; o << "expected relative offset in " << *v; error(n, id, o.str()); return; } } else if (src) { check_value_gpr(n, id, v); } } }
void def_use::process_defs(node *n, vvec &vv, bool arr_def) { for (vvec::iterator I = vv.begin(), E = vv.end(); I != E; ++I) { value *v = *I; if (!v) continue; if (arr_def) v->adef = n; else v->def = n; v->delete_uses(); if (v->is_rel()) { process_defs(n, v->mdef, true); } } }