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

Side by Side Diff: src/IceTargetLoweringMIPS32.cpp

Issue 1775253003: Cache common constants before lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Clean up code. Created 4 years, 9 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
OLDNEW
1 //===- subzero/src/IceTargetLoweringMIPS32.cpp - MIPS32 lowering ----------===// 1 //===- subzero/src/IceTargetLoweringMIPS32.cpp - MIPS32 lowering ----------===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 // 344 //
345 // If in the future the implementation is changed to lower undef 345 // If in the future the implementation is changed to lower undef
346 // values to uninitialized registers, a FakeDef will be needed: 346 // values to uninitialized registers, a FakeDef will be needed:
347 // Context.insert(InstFakeDef::create(Func, Reg)); 347 // Context.insert(InstFakeDef::create(Func, Reg));
348 // This is in order to ensure that the live range of Reg is not 348 // This is in order to ensure that the live range of Reg is not
349 // overestimated. If the constant being lowered is a 64 bit value, 349 // overestimated. If the constant being lowered is a 64 bit value,
350 // then the result should be split and the lo and hi components will 350 // then the result should be split and the lo and hi components will
351 // need to go in uninitialized registers. 351 // need to go in uninitialized registers.
352 if (isVectorType(Ty)) 352 if (isVectorType(Ty))
353 UnimplementedError(Func->getContext()->getFlags()); 353 UnimplementedError(Func->getContext()->getFlags());
354 return Ctx->getConstantZero(Ty); 354 return getConstantZero(Ty);
355 } 355 }
356 return From; 356 return From;
357 } 357 }
358 358
359 Variable *TargetMIPS32::makeReg(Type Type, RegNumT RegNum) { 359 Variable *TargetMIPS32::makeReg(Type Type, RegNumT RegNum) {
360 // There aren't any 64-bit integer registers for Mips32. 360 // There aren't any 64-bit integer registers for Mips32.
361 assert(Type != IceType_i64); 361 assert(Type != IceType_i64);
362 Variable *Reg = Func->makeVariable(Type); 362 Variable *Reg = Func->makeVariable(Type);
363 if (RegNum.hasValue()) 363 if (RegNum.hasValue())
364 Reg->setRegNum(RegNum); 364 Reg->setRegNum(RegNum);
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 Str << "\t.set\t" 1315 Str << "\t.set\t"
1316 << "nomips16\n"; 1316 << "nomips16\n";
1317 } 1317 }
1318 1318
1319 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM]; 1319 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM];
1320 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM]; 1320 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM];
1321 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM]; 1321 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM];
1322 1322
1323 } // end of namespace MIPS32 1323 } // end of namespace MIPS32
1324 } // end of namespace Ice 1324 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698