diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-05-19 13:52:29 +0200 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-05-26 15:23:25 -0700 |
commit | 36ea28646c666ac2af9b43c47e65f9f53ffcc390 (patch) | |
tree | 093bdb4d42b16b95201b2fa852dcb53ace32ae32 /ir_copy_propagation.cpp | |
parent | 7fe3de6fde0cb7e73ef36d0d600f00f4793ced0d (diff) |
Refactor ir_dereference data fields to subclasses
Diffstat (limited to 'ir_copy_propagation.cpp')
-rw-r--r-- | ir_copy_propagation.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ir_copy_propagation.cpp b/ir_copy_propagation.cpp index 47f9390710..e395fa9723 100644 --- a/ir_copy_propagation.cpp +++ b/ir_copy_propagation.cpp @@ -169,14 +169,14 @@ ir_copy_propagation_visitor::visit(ir_dereference_variable *ir) void ir_copy_propagation_visitor::visit(ir_dereference_array *ir) { - ir->var->accept(this); - ir->selector.array_index->accept(this); + ir->array->accept(this); + ir->array_index->accept(this); } void ir_copy_propagation_visitor::visit(ir_dereference_record *ir) { - ir->var->accept(this); + ir->record->accept(this); } void @@ -270,12 +270,12 @@ add_copy(ir_assignment *ir, exec_list *acp) ir_dereference *lhs_deref = ir->lhs->as_dereference(); if (!lhs_deref || lhs_deref->mode != ir_dereference::ir_reference_variable) return; - ir_variable *lhs_var = lhs_deref->var->as_variable(); + ir_variable *lhs_var = lhs_deref->variable_referenced(); ir_dereference *rhs_deref = ir->rhs->as_dereference(); if (!rhs_deref || rhs_deref->mode != ir_dereference::ir_reference_variable) return; - ir_variable *rhs_var = rhs_deref->var->as_variable(); + ir_variable *rhs_var = rhs_deref->variable_referenced(); entry = new acp_entry(lhs_var, rhs_var); acp->push_tail(entry); |