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:40:35 +0000 (19:40 +0100)
commitc6b5627c25ff5653e97ccff8c5ccf6ac967b6f83
tree8cec0d66bdd5e5a9be14bbb881eb36d09868ab39
parenta584db5460a31198bf621cdacf5bc304a984efa4
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
Change-Id: I5cea14c212b1083f90ffe6b5b53324ad663d57d8
compiler/optimizing/nodes.cc
compiler/utils/intrusive_forward_list.h
compiler/utils/intrusive_forward_list_test.cc
test/567-checker-compare/src/Main.java