compiler: handle set-and-use-temp in nilcheck code
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 6 Dec 2017 13:32:06 +0000 (13:32 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 6 Dec 2017 13:32:06 +0000 (13:32 +0000)
commit4c6f5562dce997c013340fb5d6891d777efb99be
tree7fffcd9e8ba3dcd0a191a595a2135dabded952b4
parent40242256f156e91244d770ac422e6e244b99152b
compiler: handle set-and-use-temp in nilcheck code

    Change the code in Unary_expression::do_get_backend that introduces
    explicit nil checks for dereference operations to special case
    set-and-use-temporary expressions. For this case it is better to
    generate an explicit reference of the temp in the final conditional
    (avoids introducing tree sharing).

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

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