On 11/21/2011 11:31 AM, Aldy Hernandez wrote:
>      case GIMPLE_DEBUG:
> +    case GIMPLE_TRANSACTION:
>        for (i = 0; i < gimple_num_ops (stmt); i++)
>      {
>        tree op = gimple_op (stmt, i);
> @@ -145,6 +146,8 @@ output_gimple_stmt (struct output_block
>        else
>          stream_write_tree (ob, gimple_call_fntype (stmt), true);
>      }
> +      if (gimple_code (stmt) == GIMPLE_TRANSACTION)
> +    stream_write_tree (ob, gimple_transaction_label (stmt), true); 


No point merging GIMPLE_TRANSACTION with those cases.  There are only two 
operands, BODY and LABEL, and BODY should have been lowered already.  Make this 
a separate case with an assert BODY == NULL, and writing the label.

> +      if (gimple_code (stmt) == GIMPLE_TRANSACTION)
> +    gimple_transaction_set_label (stmt, stream_read_tree (ib, data_in)); 

Similarly separate, although obviously no assert for BODY here.

Otherwise ok.


r~

Reply via email to