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

Unified Diff: src/IceTargetLowering.cpp

Issue 490333003: Subzero: Fix address mode optimization involving phi temporaries. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review comments 1 Created 6 years, 4 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/IceOperand.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('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 057a3eaf8f05f195504087255e868c0bc839f549..71788dfc8dd011b03b5ab8f1bccdea0ff181370f 100644
--- a/src/IceTargetLowering.cpp
+++ b/src/IceTargetLowering.cpp
@@ -136,6 +136,10 @@ void TargetLowering::doNopInsertion() {
void TargetLowering::lower() {
assert(!Context.atEnd());
Inst *Inst = *Context.getCur();
+ // Mark the current instruction as deleted before lowering,
+ // otherwise the Dest variable will likely get marked as non-SSA.
+ // See Variable::setDefinition().
+ Inst->setDeleted();
switch (Inst->getKind()) {
case Inst::Alloca:
lowerAlloca(llvm::dyn_cast<InstAlloca>(Inst));
@@ -200,7 +204,6 @@ void TargetLowering::lower() {
Func->setError("Can't lower unsupported instruction type");
break;
}
- Inst->setDeleted();
postLower();
« no previous file with comments | « src/IceOperand.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698