SV_EXEC_MASK,
SV_AR_INDEX,
SV_VALID_MASK,
- SV_GEOMETRY_EMIT
+ SV_GEOMETRY_EMIT,
+ SV_LDS_RW,
+ SV_LDS_OQA,
+ SV_LDS_OQB,
+ SV_SCRATCH
};
class node;
bool is_geometry_emit() {
return is_special_reg() && select == sel_chan(SV_GEOMETRY_EMIT, 0);
}
+ bool is_lds_access() {
+ return is_special_reg() && select == sel_chan(SV_LDS_RW, 0);
+ }
+ bool is_lds_oq() {
+ return is_special_reg() && (select == sel_chan(SV_LDS_OQA, 0) || select == sel_chan(SV_LDS_OQB, 0));
+ }
node* any_def() {
assert(!(def && adef));
v = v->gvn_source;
return v;
}
+ bool is_scratch() {
+ return is_special_reg() && select == sel_chan(SV_SCRATCH, 0);
+ }
bool is_float_0_or_1() {
value *v = gvalue();
}
}
+ /* Check whether copy-propagation of src into this would create an access
+ * conflict with relative addressing, i.e. an operation that tries to access
+ * array elements with different address register values.
+ */
+ bool no_reladdr_conflict_with(value *src);
+
val_set interferences;
unsigned uid;
};
NST_FETCH_INST,
NST_TEX_CLAUSE,
NST_VTX_CLAUSE,
+ NST_GDS_CLAUSE,
NST_BB,
bool is_alu_clause() { return subtype == NST_ALU_CLAUSE; }
bool is_fetch_clause() {
- return subtype == NST_TEX_CLAUSE || subtype == NST_VTX_CLAUSE;
+ return subtype == NST_TEX_CLAUSE || subtype == NST_VTX_CLAUSE || subtype == NST_GDS_CLAUSE;
}
bool is_copy() { return subtype == NST_COPY; }
return vec_uses_ar(dst) || vec_uses_ar(src);
}
+ bool vec_uses_lds_oq(vvec &vv) {
+ for (vvec::iterator I = vv.begin(), E = vv.end(); I != E; ++I) {
+ value *v = *I;
+ if (v && v->is_lds_oq())
+ return true;
+ }
+ return false;
+ }
+
+ bool consumes_lds_oq() {
+ return vec_uses_lds_oq(src);
+ }
+
+ bool produces_lds_oq() {
+ return vec_uses_lds_oq(dst);
+ }
region_node* get_parent_region();
class alu_node : public node {
protected:
- alu_node() : node(NT_OP, NST_ALU_INST) { memset(&bc, 0, sizeof(bc_alu)); };
+ alu_node() : node(NT_OP, NST_ALU_INST) { }
public:
bc_alu bc;