Subzero: Minor refactoring/additions in preparation for phi edge splitting.

The only functional change (though not actually visible at this point) is that redundant assignment elimination is moved into a separate pass.

BUG= none
R=jvoung@chromium.org

Review URL: https://codereview.chromium.org/672393003
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h
index 6e172a2..e46399d 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -39,7 +39,7 @@
   LoweringContext &operator=(const LoweringContext &) = delete;
 
 public:
-  LoweringContext() : Node(NULL) {}
+  LoweringContext() : Node(NULL), LastInserted(NULL) {}
   ~LoweringContext() {}
   void init(CfgNode *Node);
   Inst *getNextInst() const {
@@ -69,6 +69,7 @@
 private:
   // Node is the argument to Inst::updateVars().
   CfgNode *Node;
+  Inst *LastInserted;
   // Cur points to the current instruction being considered.  It is
   // guaranteed to point to a non-deleted instruction, or to be End.
   InstList::iterator Cur;
@@ -88,7 +89,6 @@
 
   void skipDeleted(InstList::iterator &I) const;
   void advanceForward(InstList::iterator &I) const;
-  void advanceBackward(InstList::iterator &I) const;
 };
 
 class TargetLowering {
@@ -145,8 +145,10 @@
   // Returns a variable pre-colored to the specified physical
   // register.  This is generally used to get very direct access to
   // the register such as in the prolog or epilog or for marking
-  // scratch registers as killed by a call.
-  virtual Variable *getPhysicalRegister(SizeT RegNum) = 0;
+  // scratch registers as killed by a call.  If a Type is not
+  // provided, a target-specific default type is used.
+  virtual Variable *getPhysicalRegister(SizeT RegNum,
+                                        Type Ty = IceType_void) = 0;
   // Returns a printable name for the register.
   virtual IceString getRegName(SizeT RegNum, Type Ty) const = 0;