Make it always possible to capture function return values.
authorJustin Seyster <jseyster@cs.sunysb.edu>
Wed, 30 Jun 2010 22:03:24 +0000 (18:03 -0400)
committerJustin Seyster <jseyster@cs.sunysb.edu>
Wed, 30 Jun 2010 22:10:17 +0000 (18:10 -0400)
op_get_return_value() can now capture the return value for function calls
that do not directly store the return value (previous it would crash).

src/aop-pc-fun-call.c

index ff5c8467fb747803d0b798679c5c582966a30d05..36cae9f72ab7bd99497eb73238013c2b832658e0 100644 (file)
@@ -177,17 +177,13 @@ op_get_return_value (struct aop_dynval *dv)
      we can grab its return value. */
   if (gimple_call_lhs(stmt) == NULL)
     {
-      /*
-      tree new_lhs = create_tmp_var(gimple_call_return_type(stmt), 
-                                    "aop_result");
-      add_referenced_var(new_lhs);
-      new_lhs = make_ssa_name(new_lhs, stmt);
-      gimple_call_set_lhs(stmt, new_lhs);
-      update_stmt(stmt); 
-      */
+      tree new_lhs = create_tmp_var (gimple_call_return_type(stmt),
+                                    "aop_return");
+      gimple_call_set_lhs (stmt, new_lhs);
+      update_stmt (stmt); 
     }
+
   return_value = stabilize_reference (gimple_call_lhs (stmt));
-  debug_gimple_stmt (stmt);
   return return_value;
 }