OSDN Git Service

Fix HInstruction::ReplaceInput(), allow no-op.
authorVladimir Marko <vmarko@google.com>
Wed, 20 Apr 2016 17:45:25 +0000 (18:45 +0100)
committerVladimir Marko <vmarko@google.com>
Wed, 20 Apr 2016 18:45:42 +0000 (19:45 +0100)
commit9ef26544e6d9c438b150dfda39be61a7b4fd8b20
treecc927c8c93ea0dd0d9431a5dbddb13b025166b18
parentccfc77e63b0bdc288f217d3b5e2657e911fa350b
Fix HInstruction::ReplaceInput(), allow no-op.

Allow HInstruction::ReplaceInput() to be called with
a `replacement` being the same as the old input and
do nothing in that case.

This is a follow-up to
    https://android-review.googlesource.com/216923
where I erroneously assumed that it never happens.

Also adhere to the standard C++ std::forward_list<>
semantics in the single-element overload of
`IntrusiveForwardList<>::splice_after()`.

Bug: 28173563

(cherry picked from commit c6b5627c25ff5653e97ccff8c5ccf6ac967b6f83)

Change-Id: I66b7d4b48f629284d0bcb1d31100519e02a872e5
compiler/optimizing/nodes.cc
compiler/utils/intrusive_forward_list.h
compiler/utils/intrusive_forward_list_test.cc
test/567-checker-compare/src/Main.java