diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-05-03 10:15:02 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-05-03 10:15:02 -0700 |
commit | 970353e047052140c592e95b2171ee5a5b323843 (patch) | |
tree | 2de6f525500f296364a2350207222ce8ab549238 /ir_function_inlining.cpp | |
parent | 438f38c55afc8a31d01af357de95a56044ea7055 (diff) | |
parent | b0e0da5f07b5072d588ab33b121933c705f3b8a1 (diff) |
Merge branch 'fixes'
Diffstat (limited to 'ir_function_inlining.cpp')
-rw-r--r-- | ir_function_inlining.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ir_function_inlining.cpp b/ir_function_inlining.cpp index 385ce9ef6d..0d072c1b76 100644 --- a/ir_function_inlining.cpp +++ b/ir_function_inlining.cpp @@ -264,8 +264,7 @@ ir_function_cloning_visitor::visit(ir_return *ir) rval = this->result->as_rvalue(); assert(rval); - result = new ir_assignment(new ir_dereference(this->retval), - ir->get_value(), NULL); + result = new ir_assignment(new ir_dereference(this->retval), rval, NULL); } @@ -389,15 +388,15 @@ ir_call::generate_inline(ir_instruction *next_ir) next_ir->insert_before(v.result); } - /* Generate the declarations for the parameters to our inlined code, - * and set up the mapping of real function body variables to ours. + /* Copy back the value of any 'out' parameters from the function body + * variables to our own. */ i = 0; param_iter = this->actual_parameters.iterator(); for (i = 0; i < num_parameters; i++) { ir_instruction *const param = (ir_instruction *) param_iter.get(); - /* Move the actual param into our param variable if it's an 'in' type. */ + /* Move our param variable into the actual param if it's an 'out' type. */ if (parameters[i]->mode == ir_var_out || parameters[i]->mode == ir_var_inout) { ir_assignment *assign; |