compiler: use a single temporary for calls with multiple results
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 28 Jul 2017 17:42:05 +0000 (17:42 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 28 Jul 2017 17:42:05 +0000 (17:42 +0000)
commit97a0928c524753bcebed187fb087862705fcdda3
treefa10dc5e6dd7a1545853a515294f4213cdb38e31
parent9de009354e6e6fb7dd0c97186ec6f9b7aa92f3a4
compiler: use a single temporary for calls with multiple results

    For calls that return multiple results we used to create a temporary
    of struct type to hold the results, and also create a separate
    temporary for each result.  Then the call expression would copy each
    result out of the struct to the temporary, and Call_result_expression
    would refer to the desired temporary.

    Simplify this to just use a single temporary of struct type, and
    change Call_result_expression to fetch a field of the struct.

    This may reduce some incorrect tree sharing in the backend code.

    Reviewed-on: https://go-review.googlesource.com/51770

From-SVN: r250682
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/expressions.h