This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
@@ -121,7 +116,8 @@ struct tailcall
/* The variables holding the value of multiplicative and additive
accumulator. */
-static tree m_acc, a_acc;
+static GTY(()) tree m_acc;
+static GTY(()) tree a_acc;
- for (bsi = bsi_last (bb); !bsi_end_p (bsi); bsi_prev (&bsi))
+ for (gsi = gsi_last (bb_seq (bb)); !gsi_end_p (gsi); gsi_prev (&gsi))
{ ass_var = propagate_through_phis (ass_var, single_succ_edge (abb)); abb = single_succ (abb); - absi = bsi_start (abb); + agsi = gsi_start (bb_seq (abb));
@@ -545,15 +526,70 @@ find_tail_calls (basic_block bb, struct *ret = nw;
}
-/* Adjust the accumulator values according to A and M after BSI, and update
- the phi nodes on edge BACK. */
+/* Helper to insert phi_arg to the phi of var in the destination of edge e. */
- arg = first_call_expr_arg (stmt, &iter), - phi = phi_nodes (first); + idx = 0, gsi = gsi_start (phi_nodes (first));
@@ -208,6 +209,9 @@ gimple_to_tree (gimple stmt) /* If the call has a LHS then create a MODIFY_EXPR to hold it. */ if (gimple_call_lhs (stmt)) t = build_gimple_modify_stmt (gimple_call_lhs (stmt), t); + + /* If GIMPLE is marked as a tail-call, do the same to tree. */ + CALL_EXPR_TAILCALL (call) = gimple_call_tail_p (stmt);
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |