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

Unified Diff: src/IceTargetLowering.cpp

Issue 672393003: Subzero: Minor refactoring/additions in preparation for phi edge splitting. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove deprecated advanceBackward method Created 6 years, 2 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 | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringX8632.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLowering.cpp
diff --git a/src/IceTargetLowering.cpp b/src/IceTargetLowering.cpp
index bcc629098bf94d13ef3012fb24900f6613dfa08b..b18999f67ebb6e7013bd5cf3153bf4121f79e938 100644
--- a/src/IceTargetLowering.cpp
+++ b/src/IceTargetLowering.cpp
@@ -54,6 +54,7 @@ void LoweringContext::init(CfgNode *N) {
void LoweringContext::insert(Inst *Inst) {
getNode()->getInsts().insert(Next, Inst);
+ LastInserted = Inst;
}
void LoweringContext::skipDeleted(InstList::iterator &I) const {
@@ -68,17 +69,9 @@ void LoweringContext::advanceForward(InstList::iterator &I) const {
}
}
-void LoweringContext::advanceBackward(InstList::iterator &I) const {
- assert(I != Begin);
- do {
- --I;
- } while (I != Begin && (*I)->isDeleted());
-}
-
Inst *LoweringContext::getLastInserted() const {
- InstList::iterator Cursor = Next;
- advanceBackward(Cursor);
- return *Cursor;
+ assert(LastInserted);
+ return LastInserted;
}
TargetLowering *TargetLowering::createLowering(TargetArch Target, Cfg *Func) {
« no previous file with comments | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringX8632.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698