Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: src/IceTargetLowering.h

Issue 709533002: Subzero: Implement InstList in terms of llvm::ilist<> . (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a comment explaining the ilist traits specialization Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceOperand.cpp ('k') | src/IceTargetLowering.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 27 matching lines...) Expand all
38 LoweringContext(const LoweringContext &) = delete; 38 LoweringContext(const LoweringContext &) = delete;
39 LoweringContext &operator=(const LoweringContext &) = delete; 39 LoweringContext &operator=(const LoweringContext &) = delete;
40 40
41 public: 41 public:
42 LoweringContext() : Node(NULL), LastInserted(NULL) {} 42 LoweringContext() : Node(NULL), LastInserted(NULL) {}
43 ~LoweringContext() {} 43 ~LoweringContext() {}
44 void init(CfgNode *Node); 44 void init(CfgNode *Node);
45 Inst *getNextInst() const { 45 Inst *getNextInst() const {
46 if (Next == End) 46 if (Next == End)
47 return NULL; 47 return NULL;
48 return *Next; 48 return Next;
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 getEnd() const { return End; } 59 InstList::iterator getEnd() const { return End; }
60 // Adaptor to enable range-based for loops. 60 // Adaptor to enable range-based for loops.
61 InstList::iterator begin() const { return getCur(); } 61 InstList::iterator begin() const { return getCur(); }
62 InstList::iterator end() const { return getEnd(); } 62 InstList::iterator end() const { return getEnd(); }
63 void insert(Inst *Inst); 63 void insert(Inst *Inst);
64 Inst *getLastInserted() const; 64 Inst *getLastInserted() const;
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 virtual void lower(const VariableDeclaration &Var) = 0; 269 virtual void lower(const VariableDeclaration &Var) = 0;
270 270
271 protected: 271 protected:
272 TargetGlobalInitLowering(GlobalContext *Ctx) : Ctx(Ctx) {} 272 TargetGlobalInitLowering(GlobalContext *Ctx) : Ctx(Ctx) {}
273 GlobalContext *Ctx; 273 GlobalContext *Ctx;
274 }; 274 };
275 275
276 } // end of namespace Ice 276 } // end of namespace Ice
277 277
278 #endif // SUBZERO_SRC_ICETARGETLOWERING_H 278 #endif // SUBZERO_SRC_ICETARGETLOWERING_H
OLDNEW
« no previous file with comments | « src/IceOperand.cpp ('k') | src/IceTargetLowering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698