mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
Add inlining support for array dereferences.
This commit is contained in:
parent
cad9766118
commit
6192434ac3
1 changed files with 14 additions and 1 deletions
|
|
@ -200,8 +200,21 @@ ir_function_cloning_visitor::visit(ir_dereference *ir)
|
|||
|
||||
this->result = new ir_dereference(this->result);
|
||||
}
|
||||
} else if (ir->mode == ir_dereference::ir_reference_array) {
|
||||
ir_instruction *variable;
|
||||
ir_rvalue *index;
|
||||
|
||||
ir->var->accept(this);
|
||||
variable = this->result;
|
||||
|
||||
ir->selector.array_index->accept(this);
|
||||
index = this->result->as_rvalue();
|
||||
|
||||
this->result = new ir_dereference(variable, index);
|
||||
} else {
|
||||
this->result = NULL;
|
||||
assert(ir->mode == ir_dereference::ir_reference_record);
|
||||
/* FINISHME: inlining of structure references */
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue