Subzero: Fix a bug in postLower().
In -O2 mode, postLower() is supposed to iterate over just the
instructions that were most recently added. Instead, it was iterating
all the way to the end of the block, also post-lowering high-level ICE
instructions that hadn't yet been lowered. This was basically
harmless, given that the spec2k asm code is identical after this
patch, but it improves performance.
BUG= none
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/721333004
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h
index 07d665f..da1d3f0 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -56,10 +56,8 @@
CfgNode *getNode() const { return Node; }
bool atEnd() const { return Cur == End; }
InstList::iterator getCur() const { return Cur; }
+ InstList::iterator getNext() const { return Next; }
InstList::iterator getEnd() const { return End; }
- // Adaptor to enable range-based for loops.
- InstList::iterator begin() const { return getCur(); }
- InstList::iterator end() const { return getEnd(); }
void insert(Inst *Inst);
Inst *getLastInserted() const;
void advanceCur() { Cur = Next; }