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

Unified Diff: src/IceTargetLoweringMIPS32.h

Issue 1527143003: Subzero. Introduces a new LoweringContext::insert() method. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: More changes Created 5 years 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/IceTargetLoweringARM32.cpp ('k') | src/IceTargetLoweringMIPS32.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringMIPS32.h
diff --git a/src/IceTargetLoweringMIPS32.h b/src/IceTargetLoweringMIPS32.h
index bf96661d5241378c0cae27aa26d73b6aeaa4e912..60c62dd105d3dba053a96266c8a039dc965795cc 100644
--- a/src/IceTargetLoweringMIPS32.h
+++ b/src/IceTargetLoweringMIPS32.h
@@ -116,60 +116,59 @@ public:
// minimal syntactic overhead, so that the lowering code can look as close to
// assembly as practical.
void _add(Variable *Dest, Variable *Src0, Variable *Src1) {
- Context.insert(InstMIPS32Add::create(Func, Dest, Src0, Src1));
+ Context.insert<InstMIPS32Add>(Dest, Src0, Src1);
}
void _and(Variable *Dest, Variable *Src0, Variable *Src1) {
- Context.insert(InstMIPS32And::create(Func, Dest, Src0, Src1));
+ Context.insert<InstMIPS32And>(Dest, Src0, Src1);
}
void _ret(Variable *RA, Variable *Src0 = nullptr) {
- Context.insert(InstMIPS32Ret::create(Func, RA, Src0));
+ Context.insert<InstMIPS32Ret>(RA, Src0);
}
void _addiu(Variable *Dest, Variable *Src, uint32_t Imm) {
- Context.insert(InstMIPS32Addiu::create(Func, Dest, Src, Imm));
+ Context.insert<InstMIPS32Addiu>(Dest, Src, Imm);
}
void _lui(Variable *Dest, uint32_t Imm) {
- Context.insert(InstMIPS32Lui::create(Func, Dest, Imm));
+ Context.insert<InstMIPS32Lui>(Dest, Imm);
}
void _mov(Variable *Dest, Operand *Src0) {
assert(Dest != nullptr);
// Variable* Src0_ = llvm::dyn_cast<Variable>(Src0);
if (llvm::isa<ConstantRelocatable>(Src0)) {
- Context.insert(InstMIPS32La::create(Func, Dest, Src0));
+ Context.insert<InstMIPS32La>(Dest, Src0);
} else {
- auto *Instr = InstMIPS32Mov::create(Func, Dest, Src0);
- Context.insert(Instr);
+ auto *Instr = Context.insert<InstMIPS32Mov>(Dest, Src0);
if (Instr->isMultiDest()) {
// If Instr is multi-dest, then Dest must be a Variable64On32. We add a
// fake-def for Instr.DestHi here.
assert(llvm::isa<Variable64On32>(Dest));
- Context.insert(InstFakeDef::create(Func, Instr->getDestHi()));
+ Context.insert<InstFakeDef>(Instr->getDestHi());
}
}
}
void _mul(Variable *Dest, Variable *Src0, Variable *Src1) {
- Context.insert(InstMIPS32Mul::create(Func, Dest, Src0, Src1));
+ Context.insert<InstMIPS32Mul>(Dest, Src0, Src1);
}
void _or(Variable *Dest, Variable *Src0, Variable *Src1) {
- Context.insert(InstMIPS32Or::create(Func, Dest, Src0, Src1));
+ Context.insert<InstMIPS32Or>(Dest, Src0, Src1);
}
void _ori(Variable *Dest, Variable *Src, uint32_t Imm) {
- Context.insert(InstMIPS32Ori::create(Func, Dest, Src, Imm));
+ Context.insert<InstMIPS32Ori>(Dest, Src, Imm);
}
void _sub(Variable *Dest, Variable *Src0, Variable *Src1) {
- Context.insert(InstMIPS32Sub::create(Func, Dest, Src0, Src1));
+ Context.insert<InstMIPS32Sub>(Dest, Src0, Src1);
}
void _xor(Variable *Dest, Variable *Src0, Variable *Src1) {
- Context.insert(InstMIPS32Xor::create(Func, Dest, Src0, Src1));
+ Context.insert<InstMIPS32Xor>(Dest, Src0, Src1);
}
void lowerArguments() override;
« no previous file with comments | « src/IceTargetLoweringARM32.cpp ('k') | src/IceTargetLoweringMIPS32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698