]> git.ipfire.org Git - thirdparty/gcc.git/commit
compiler: make heap expression's write barrier conditional
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Jun 2019 21:08:42 +0000 (21:08 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Jun 2019 21:08:42 +0000 (21:08 +0000)
commitd6eeba0174da85f2bde7f836098be85bc5abf593
tree344882ca7aca8afcf2c908ba8ab684d36c5f7413
parent1a82e1c19d18fb1c3d8e93e48477fc9430b97907
compiler: make heap expression's write barrier conditional

    Heap_expression::do_get_backend emits an unconditional write
    barrier if the type has pointers and it is not a stack allocation.
    This CL changes it to use a write barrier for the assignment only
    when write barriers are enabled. While here, also change it to
    call gcWriteBarrier instead of typedmemmove for pointer-shaped
    types.

    For this to work, Function::build needs to be adjusted so that
    Heap_expression::do_get_backend is called when there is a parent
    block.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/181540

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@272132 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/gogo.cc
gcc/go/gofrontend/gogo.h