ART: SBC: Support single exit loops with live_outs.

Support copying subgraphs with a single exit and live-outs -
values which are defined inside the subgraph and have uses outside.

Test: test-art-target, test-art-host.
Test: 530-checker-peel-unroll.

Change-Id: Id06a6f08d14c6e86f6437d662e24489f955e9edf
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 09d9c57..3fd5b6b 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -1909,6 +1909,11 @@
 
   void RemoveAsUserOfInput(size_t index) const;
 
+  // Replaces the input at the position 'index' with the replacement; the replacement and old
+  // input instructions' env_uses_ lists are adjusted. The function works similar to
+  // HInstruction::ReplaceInput.
+  void ReplaceInput(HInstruction* replacement, size_t index);
+
   size_t Size() const { return vregs_.size(); }
 
   HEnvironment* GetParent() const { return parent_; }