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

Unified Diff: src/IceTargetLowering.h

Issue 417353003: Fix bug when atomic load is fused with an arith op (and not in the entry BB) (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: review Created 6 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/IceTargetLowering.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLowering.h
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h
index ec86cffae50396a54690c2d3167cebb01070b562..91512a9fb47189ad7f322bb1d18e8c08816f076b 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -42,7 +42,7 @@ public:
return *Next;
}
Inst *getNextInst(InstList::iterator &Iter) const {
- advance(Iter);
+ advanceForward(Iter);
if (Iter == End)
return NULL;
return *Iter;
@@ -52,8 +52,9 @@ public:
InstList::iterator getCur() const { return Cur; }
InstList::iterator getEnd() const { return End; }
void insert(Inst *Inst);
+ Inst *getLastInserted() const;
void advanceCur() { Cur = Next; }
- void advanceNext() { advance(Next); }
+ void advanceNext() { advanceForward(Next); }
void setInsertPoint(const InstList::iterator &Position) { Next = Position; }
private:
@@ -71,11 +72,14 @@ private:
// insertion point", to avoid confusion when previously-deleted
// instructions come between the two points.
InstList::iterator Next;
+ // Begin is a copy of Insts.begin(), used if iterators are moved backward.
+ InstList::iterator Begin;
// End is a copy of Insts.end(), used if Next needs to be advanced.
InstList::iterator End;
void skipDeleted(InstList::iterator &I) const;
- void advance(InstList::iterator &I) const;
+ void advanceForward(InstList::iterator &I) const;
+ void advanceBackward(InstList::iterator &I) const;
LoweringContext(const LoweringContext &) LLVM_DELETED_FUNCTION;
LoweringContext &operator=(const LoweringContext &) LLVM_DELETED_FUNCTION;
};
« no previous file with comments | « no previous file | src/IceTargetLowering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698