Update the remaining input index of phis after deleting an input.
bug:20715803
bug:20690906
Change-Id: Iaf08f0c30d629e766be2b04815dc3e38b6e7ff35
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 50eecff..63f3c95 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -850,13 +850,14 @@
HUseListNode* GetNext() const { return next_; }
T GetUser() const { return user_; }
size_t GetIndex() const { return index_; }
+ void SetIndex(size_t index) { index_ = index; }
private:
HUseListNode(T user, size_t index)
: user_(user), index_(index), prev_(nullptr), next_(nullptr) {}
T const user_;
- const size_t index_;
+ size_t index_;
HUseListNode<T>* prev_;
HUseListNode<T>* next_;
@@ -1090,7 +1091,7 @@
GrowableArray<HUserRecord<HEnvironment*> > vregs_;
- friend HInstruction;
+ friend class HInstruction;
DISALLOW_COPY_AND_ASSIGN(HEnvironment);
};