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

Side by Side Diff: src/IceTargetLoweringARM32.cpp

Issue 1599803002: Subzero: Remove unneeded ScratchRegs. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: More cleanup Created 4 years, 11 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/IceTargetLoweringARM32.h ('k') | src/IceTargetLoweringMIPS32.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 //===- subzero/src/IceTargetLoweringARM32.cpp - ARM32 lowering ------------===// 1 //===- subzero/src/IceTargetLoweringARM32.cpp - ARM32 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 void TargetARM32::staticInit(GlobalContext *Ctx) { 280 void TargetARM32::staticInit(GlobalContext *Ctx) {
281 281
282 // Limit this size (or do all bitsets need to be the same width)??? 282 // Limit this size (or do all bitsets need to be the same width)???
283 llvm::SmallBitVector IntegerRegisters(RegARM32::Reg_NUM); 283 llvm::SmallBitVector IntegerRegisters(RegARM32::Reg_NUM);
284 llvm::SmallBitVector I64PairRegisters(RegARM32::Reg_NUM); 284 llvm::SmallBitVector I64PairRegisters(RegARM32::Reg_NUM);
285 llvm::SmallBitVector Float32Registers(RegARM32::Reg_NUM); 285 llvm::SmallBitVector Float32Registers(RegARM32::Reg_NUM);
286 llvm::SmallBitVector Float64Registers(RegARM32::Reg_NUM); 286 llvm::SmallBitVector Float64Registers(RegARM32::Reg_NUM);
287 llvm::SmallBitVector VectorRegisters(RegARM32::Reg_NUM); 287 llvm::SmallBitVector VectorRegisters(RegARM32::Reg_NUM);
288 llvm::SmallBitVector InvalidRegisters(RegARM32::Reg_NUM); 288 llvm::SmallBitVector InvalidRegisters(RegARM32::Reg_NUM);
289 ScratchRegs.resize(RegARM32::Reg_NUM);
290 for (int i = 0; i < RegARM32::Reg_NUM; ++i) { 289 for (int i = 0; i < RegARM32::Reg_NUM; ++i) {
291 const auto &Entry = RegARM32::RegTable[i]; 290 const auto &Entry = RegARM32::RegTable[i];
292 IntegerRegisters[i] = Entry.IsInt; 291 IntegerRegisters[i] = Entry.IsInt;
293 I64PairRegisters[i] = Entry.IsI64Pair; 292 I64PairRegisters[i] = Entry.IsI64Pair;
294 Float32Registers[i] = Entry.IsFP32; 293 Float32Registers[i] = Entry.IsFP32;
295 Float64Registers[i] = Entry.IsFP64; 294 Float64Registers[i] = Entry.IsFP64;
296 VectorRegisters[i] = Entry.IsVec128; 295 VectorRegisters[i] = Entry.IsVec128;
297 ScratchRegs[i] = Entry.Scratch;
298 RegisterAliases[i].resize(RegARM32::Reg_NUM); 296 RegisterAliases[i].resize(RegARM32::Reg_NUM);
299 for (int j = 0; j < Entry.NumAliases; ++j) { 297 for (int j = 0; j < Entry.NumAliases; ++j) {
300 assert(i == j || !RegisterAliases[i][Entry.Aliases[j]]); 298 assert(i == j || !RegisterAliases[i][Entry.Aliases[j]]);
301 RegisterAliases[i].set(Entry.Aliases[j]); 299 RegisterAliases[i].set(Entry.Aliases[j]);
302 } 300 }
303 assert(RegisterAliases[i][i]); 301 assert(RegisterAliases[i][i]);
304 if (Entry.CCArg <= 0) { 302 if (Entry.CCArg <= 0) {
305 continue; 303 continue;
306 } 304 }
307 if (Entry.IsGPR) { 305 if (Entry.IsGPR) {
(...skipping 6184 matching lines...) Expand 10 before | Expand all | Expand 10 after
6492 if (CPUFeatures.hasFeature(TargetARM32Features::HWDivArm)) { 6490 if (CPUFeatures.hasFeature(TargetARM32Features::HWDivArm)) {
6493 Str << ".eabi_attribute 44, 2 @ Tag_DIV_use\n"; 6491 Str << ".eabi_attribute 44, 2 @ Tag_DIV_use\n";
6494 } 6492 }
6495 // Technically R9 is used for TLS with Sandboxing, and we reserve it. 6493 // Technically R9 is used for TLS with Sandboxing, and we reserve it.
6496 // However, for compatibility with current NaCl LLVM, don't claim that. 6494 // However, for compatibility with current NaCl LLVM, don't claim that.
6497 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; 6495 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n";
6498 } 6496 }
6499 6497
6500 llvm::SmallBitVector TargetARM32::TypeToRegisterSet[IceType_NUM]; 6498 llvm::SmallBitVector TargetARM32::TypeToRegisterSet[IceType_NUM];
6501 llvm::SmallBitVector TargetARM32::RegisterAliases[RegARM32::Reg_NUM]; 6499 llvm::SmallBitVector TargetARM32::RegisterAliases[RegARM32::Reg_NUM];
6502 llvm::SmallBitVector TargetARM32::ScratchRegs;
6503 6500
6504 } // end of namespace ARM32 6501 } // end of namespace ARM32
6505 } // end of namespace Ice 6502 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLoweringARM32.h ('k') | src/IceTargetLoweringMIPS32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698