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

Unified Diff: src/IceTargetLowering.cpp

Issue 1182603004: Subzero: Transform suitable Load/Arith/Store sequences into RMW ops. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 5 years, 6 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 52017ea093250a63ac70a7381082f1c466759c05..5355a33206b3ceb24d9f864caa8edbed029ad0a0 100644
--- a/src/IceTargetLowering.cpp
+++ b/src/IceTargetLowering.cpp
@@ -130,10 +130,13 @@ void TargetLowering::lower() {
assert(!Context.atEnd());
Inst *Inst = Context.getCur();
Inst->deleteIfDead();
- if (!Inst->isDeleted()) {
+ if (!Inst->isDeleted() && !llvm::isa<InstFakeDef>(Inst) &&
+ !llvm::isa<InstFakeUse>(Inst)) {
// Mark the current instruction as deleted before lowering,
// otherwise the Dest variable will likely get marked as non-SSA.
- // See Variable::setDefinition().
+ // See Variable::setDefinition(). However, just pass-through
+ // FakeDef and FakeUse instructions that might have been inserted
+ // prior to lowering.
Inst->setDeleted();
switch (Inst->getKind()) {
case Inst::Alloca:
@@ -194,15 +197,8 @@ void TargetLowering::lower() {
case Inst::Unreachable:
lowerUnreachable(llvm::cast<InstUnreachable>(Inst));
break;
- case Inst::BundleLock:
- case Inst::BundleUnlock:
- case Inst::FakeDef:
- case Inst::FakeUse:
- case Inst::FakeKill:
- case Inst::Target:
- // These are all Target instruction types and shouldn't be
- // encountered at this stage.
- Func->setError("Can't lower unsupported instruction type");
+ default:
+ lowerOther(Inst);
break;
}
@@ -213,6 +209,11 @@ void TargetLowering::lower() {
Context.advanceNext();
}
+void TargetLowering::lowerOther(const Inst *Instr) {
+ (void)Instr;
+ Func->setError("Can't lower unsupported instruction type");
+}
+
// Drives register allocation, allowing all physical registers (except
// perhaps for the frame pointer) to be allocated. This set of
// registers could potentially be parameterized if we want to restrict
« 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