| OLD | NEW |
| 1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- C++ -*-===// | 1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // This file declares the TargetLowering and LoweringContext | 10 // This file declares the TargetLowering and LoweringContext |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 } | 49 } |
| 50 Inst *getNextInst(InstList::iterator &Iter) const { | 50 Inst *getNextInst(InstList::iterator &Iter) const { |
| 51 advanceForward(Iter); | 51 advanceForward(Iter); |
| 52 if (Iter == End) | 52 if (Iter == End) |
| 53 return NULL; | 53 return NULL; |
| 54 return Iter; | 54 return Iter; |
| 55 } | 55 } |
| 56 CfgNode *getNode() const { return Node; } | 56 CfgNode *getNode() const { return Node; } |
| 57 bool atEnd() const { return Cur == End; } | 57 bool atEnd() const { return Cur == End; } |
| 58 InstList::iterator getCur() const { return Cur; } | 58 InstList::iterator getCur() const { return Cur; } |
| 59 InstList::iterator getNext() const { return Next; } |
| 59 InstList::iterator getEnd() const { return End; } | 60 InstList::iterator getEnd() const { return End; } |
| 60 // Adaptor to enable range-based for loops. | |
| 61 InstList::iterator begin() const { return getCur(); } | |
| 62 InstList::iterator end() const { return getEnd(); } | |
| 63 void insert(Inst *Inst); | 61 void insert(Inst *Inst); |
| 64 Inst *getLastInserted() const; | 62 Inst *getLastInserted() const; |
| 65 void advanceCur() { Cur = Next; } | 63 void advanceCur() { Cur = Next; } |
| 66 void advanceNext() { advanceForward(Next); } | 64 void advanceNext() { advanceForward(Next); } |
| 67 void rewind(); | 65 void rewind(); |
| 68 void setInsertPoint(const InstList::iterator &Position) { Next = Position; } | 66 void setInsertPoint(const InstList::iterator &Position) { Next = Position; } |
| 69 | 67 |
| 70 private: | 68 private: |
| 71 // Node is the argument to Inst::updateVars(). | 69 // Node is the argument to Inst::updateVars(). |
| 72 CfgNode *Node; | 70 CfgNode *Node; |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 virtual void lower(const VariableDeclaration &Var) = 0; | 263 virtual void lower(const VariableDeclaration &Var) = 0; |
| 266 | 264 |
| 267 protected: | 265 protected: |
| 268 TargetGlobalInitLowering(GlobalContext *Ctx) : Ctx(Ctx) {} | 266 TargetGlobalInitLowering(GlobalContext *Ctx) : Ctx(Ctx) {} |
| 269 GlobalContext *Ctx; | 267 GlobalContext *Ctx; |
| 270 }; | 268 }; |
| 271 | 269 |
| 272 } // end of namespace Ice | 270 } // end of namespace Ice |
| 273 | 271 |
| 274 #endif // SUBZERO_SRC_ICETARGETLOWERING_H | 272 #endif // SUBZERO_SRC_ICETARGETLOWERING_H |
| OLD | NEW |