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

Side by Side Diff: src/IceTargetLoweringMIPS32.cpp

Issue 2116213002: Subzero: Allow deeper levels of variable splitting. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 4 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 unified diff | Download patch
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX86BaseImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // 1 //
2 // The Subzero Code Generator 2 // The Subzero Code Generator
3 // 3 //
4 // This file is distributed under the University of Illinois Open Source 4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details. 5 // License. See LICENSE.TXT for details.
6 // 6 //
7 //===----------------------------------------------------------------------===// 7 //===----------------------------------------------------------------------===//
8 /// 8 ///
9 /// \file 9 /// \file
10 /// \brief Implements the TargetLoweringMIPS32 class, which consists almost 10 /// \brief Implements the TargetLoweringMIPS32 class, which consists almost
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 // OperandMIPS32Mem, so in that case it wouldn't need another level of 461 // OperandMIPS32Mem, so in that case it wouldn't need another level of
462 // transformation. 462 // transformation.
463 if (auto *Mem = llvm::dyn_cast<OperandMIPS32Mem>(Operand)) { 463 if (auto *Mem = llvm::dyn_cast<OperandMIPS32Mem>(Operand)) {
464 return Mem; 464 return Mem;
465 } 465 }
466 466
467 // If we didn't do address mode optimization, then we only have a base/offset 467 // If we didn't do address mode optimization, then we only have a base/offset
468 // to work with. MIPS always requires a base register, so just use that to 468 // to work with. MIPS always requires a base register, so just use that to
469 // hold the operand. 469 // hold the operand.
470 auto *Base = llvm::cast<Variable>(legalize(Operand, Legal_Reg)); 470 auto *Base = llvm::cast<Variable>(legalize(Operand, Legal_Reg));
471 const int32_t Offset = Base->hasStackOffset() ? Base->getStackOffset() : 0;
471 return OperandMIPS32Mem::create( 472 return OperandMIPS32Mem::create(
472 Func, Ty, Base, llvm::cast<ConstantInteger32>( 473 Func, Ty, Base,
473 Ctx->getConstantInt32(Base->getStackOffset()))); 474 llvm::cast<ConstantInteger32>(Ctx->getConstantInt32(Offset)));
474 } 475 }
475 476
476 void TargetMIPS32::emitVariable(const Variable *Var) const { 477 void TargetMIPS32::emitVariable(const Variable *Var) const {
477 if (!BuildDefs::dump()) 478 if (!BuildDefs::dump())
478 return; 479 return;
479 Ostream &Str = Ctx->getStrEmit(); 480 Ostream &Str = Ctx->getStrEmit();
480 const Type FrameSPTy = IceType_i32; 481 const Type FrameSPTy = IceType_i32;
481 if (Var->hasReg()) { 482 if (Var->hasReg()) {
482 Str << '$' << getRegName(Var->getRegNum(), Var->getType()); 483 Str << '$' << getRegName(Var->getRegNum(), Var->getType());
483 } else { 484 } else {
(...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after
2341 Str << "\t.set\t" 2342 Str << "\t.set\t"
2342 << "nomips16\n"; 2343 << "nomips16\n";
2343 } 2344 }
2344 2345
2345 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM]; 2346 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM];
2346 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM]; 2347 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM];
2347 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM]; 2348 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM];
2348 2349
2349 } // end of namespace MIPS32 2350 } // end of namespace MIPS32
2350 } // end of namespace Ice 2351 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX86BaseImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698