OLD | NEW |
1 //===- subzero/src/IceTargetLoweringX8632Traits.h - x86-32 traits -*- C++ -*-=// | 1 //===- subzero/src/IceTargetLoweringX8632Traits.h - x86-32 traits -*- C++ -*-=// |
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 static constexpr bool Is64Bit = false; | 53 static constexpr bool Is64Bit = false; |
54 static constexpr bool HasPopa = true; | 54 static constexpr bool HasPopa = true; |
55 static constexpr bool HasPusha = true; | 55 static constexpr bool HasPusha = true; |
56 static constexpr bool UsesX87 = true; | 56 static constexpr bool UsesX87 = true; |
57 static constexpr ::Ice::RegX8632::GPRRegister Last8BitGPR = | 57 static constexpr ::Ice::RegX8632::GPRRegister Last8BitGPR = |
58 ::Ice::RegX8632::GPRRegister::Encoded_Reg_ebx; | 58 ::Ice::RegX8632::GPRRegister::Encoded_Reg_ebx; |
59 | 59 |
60 enum ScaleFactor { TIMES_1 = 0, TIMES_2 = 1, TIMES_4 = 2, TIMES_8 = 3 }; | 60 enum ScaleFactor { TIMES_1 = 0, TIMES_2 = 1, TIMES_4 = 2, TIMES_8 = 3 }; |
61 | 61 |
62 using GPRRegister = ::Ice::RegX8632::GPRRegister; | 62 using GPRRegister = ::Ice::RegX8632::GPRRegister; |
| 63 using ByteRegister = ::Ice::RegX8632::ByteRegister; |
63 using XmmRegister = ::Ice::RegX8632::XmmRegister; | 64 using XmmRegister = ::Ice::RegX8632::XmmRegister; |
64 using ByteRegister = ::Ice::RegX8632::ByteRegister; | |
65 using X87STRegister = ::Ice::RegX8632::X87STRegister; | 65 using X87STRegister = ::Ice::RegX8632::X87STRegister; |
66 | 66 |
67 using Cond = ::Ice::CondX86; | 67 using Cond = ::Ice::CondX86; |
68 | 68 |
69 using RegisterSet = ::Ice::RegX8632; | 69 using RegisterSet = ::Ice::RegX8632; |
70 static const GPRRegister Encoded_Reg_Accumulator = RegX8632::Encoded_Reg_eax; | 70 static const GPRRegister Encoded_Reg_Accumulator = RegX8632::Encoded_Reg_eax; |
71 static const GPRRegister Encoded_Reg_Counter = RegX8632::Encoded_Reg_ecx; | 71 static const GPRRegister Encoded_Reg_Counter = RegX8632::Encoded_Reg_ecx; |
72 static const FixupKind PcRelFixup = llvm::ELF::R_386_PC32; | 72 static const FixupKind PcRelFixup = llvm::ELF::R_386_PC32; |
73 static const FixupKind RelFixup = llvm::ELF::R_386_32; | 73 static const FixupKind RelFixup = llvm::ELF::R_386_32; |
74 | 74 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 Begin, | 260 Begin, |
261 // SSE2 is the PNaCl baseline instruction set. | 261 // SSE2 is the PNaCl baseline instruction set. |
262 SSE2 = Begin, | 262 SSE2 = Begin, |
263 SSE4_1, | 263 SSE4_1, |
264 End | 264 End |
265 }; | 265 }; |
266 | 266 |
267 static const char *TargetName; | 267 static const char *TargetName; |
268 static constexpr Type WordType = IceType_i32; | 268 static constexpr Type WordType = IceType_i32; |
269 | 269 |
270 static IceString getRegName(SizeT RegNum, Type Ty) { | 270 static IceString getRegName(int32_t RegNum) { |
271 assert(RegNum < RegisterSet::Reg_NUM); | 271 static const char *const RegNames[] = { |
272 static const char *RegNames8[] = { | 272 #define X(val, encode, name, base, scratch, preserved, stackptr, frameptr, \ |
273 #define X(val, encode, name, name16, name8, scratch, preserved, stackptr, \ | 273 isGPR, is64, is32, is16, is8, isXmm, is64To8, is32To8, is16To8, \ |
274 frameptr, isI8, isInt, isFP) \ | 274 isTrunc8Rcvr, isAhRcvr, aliases) \ |
275 name8, | |
276 REGX8632_TABLE | |
277 #undef X | |
278 }; | |
279 | |
280 static const char *RegNames16[] = { | |
281 #define X(val, encode, name, name16, name8, scratch, preserved, stackptr, \ | |
282 frameptr, isI8, isInt, isFP) \ | |
283 name16, | |
284 REGX8632_TABLE | |
285 #undef X | |
286 }; | |
287 | |
288 static const char *RegNames[] = { | |
289 #define X(val, encode, name, name16, name8, scratch, preserved, stackptr, \ | |
290 frameptr, isI8, isInt, isFP) \ | |
291 name, | 275 name, |
292 REGX8632_TABLE | 276 REGX8632_TABLE |
293 #undef X | 277 #undef X |
294 }; | 278 }; |
| 279 assert(RegNum >= 0); |
| 280 assert(RegNum < RegisterSet::Reg_NUM); |
| 281 return RegNames[RegNum]; |
| 282 } |
295 | 283 |
296 switch (Ty) { | 284 static GPRRegister getEncodedGPR(int32_t RegNum) { |
297 case IceType_i1: | 285 static const GPRRegister GPRRegs[] = { |
298 case IceType_i8: | 286 #define X(val, encode, name, base, scratch, preserved, stackptr, frameptr, \ |
299 return RegNames8[RegNum]; | 287 isGPR, is64, is32, is16, is8, isXmm, is64To8, is32To8, is16To8, \ |
300 case IceType_i16: | 288 isTrunc8Rcvr, isAhRcvr, aliases) \ |
301 return RegNames16[RegNum]; | 289 GPRRegister(isGPR ? encode : GPRRegister::Encoded_Not_GPR), |
302 default: | 290 REGX8632_TABLE |
303 return RegNames[RegNum]; | 291 #undef X |
| 292 }; |
| 293 assert(RegNum >= 0); |
| 294 assert(RegNum < RegisterSet::Reg_NUM); |
| 295 assert(GPRRegs[RegNum] != GPRRegister::Encoded_Not_GPR); |
| 296 return GPRRegs[RegNum]; |
| 297 } |
| 298 |
| 299 static ByteRegister getEncodedByteReg(int32_t RegNum) { |
| 300 static const ByteRegister ByteRegs[] = { |
| 301 #define X(val, encode, name, base, scratch, preserved, stackptr, frameptr, \ |
| 302 isGPR, is64, is32, is16, is8, isXmm, is64To8, is32To8, is16To8, \ |
| 303 isTrunc8Rcvr, isAhRcvr, aliases) \ |
| 304 ByteRegister(is8 ? encode : ByteRegister::Encoded_Not_ByteReg), |
| 305 REGX8632_TABLE |
| 306 #undef X |
| 307 }; |
| 308 assert(RegNum >= 0); |
| 309 assert(RegNum < RegisterSet::Reg_NUM); |
| 310 assert(ByteRegs[RegNum] != ByteRegister::Encoded_Not_ByteReg); |
| 311 return ByteRegs[RegNum]; |
| 312 } |
| 313 |
| 314 static XmmRegister getEncodedXmm(int32_t RegNum) { |
| 315 static const XmmRegister XmmRegs[] = { |
| 316 #define X(val, encode, name, base, scratch, preserved, stackptr, frameptr, \ |
| 317 isGPR, is64, is32, is16, is8, isXmm, is64To8, is32To8, is16To8, \ |
| 318 isTrunc8Rcvr, isAhRcvr, aliases) \ |
| 319 XmmRegister(isXmm ? encode : XmmRegister::Encoded_Not_Xmm), |
| 320 REGX8632_TABLE |
| 321 #undef X |
| 322 }; |
| 323 assert(RegNum >= 0); |
| 324 assert(RegNum < RegisterSet::Reg_NUM); |
| 325 assert(XmmRegs[RegNum] != XmmRegister::Encoded_Not_Xmm); |
| 326 return XmmRegs[RegNum]; |
| 327 } |
| 328 |
| 329 static uint32_t getEncoding(int32_t RegNum) { |
| 330 static const uint32_t Encoding[] = { |
| 331 #define X(val, encode, name, base, scratch, preserved, stackptr, frameptr, \ |
| 332 isGPR, is64, is32, is16, is8, isXmm, is64To8, is32To8, is16To8, \ |
| 333 isTrunc8Rcvr, isAhRcvr, aliases) \ |
| 334 encode, |
| 335 REGX8632_TABLE |
| 336 #undef X |
| 337 }; |
| 338 assert(RegNum >= 0); |
| 339 assert(RegNum < RegisterSet::Reg_NUM); |
| 340 return Encoding[RegNum]; |
| 341 } |
| 342 |
| 343 static int32_t getBaseReg(int32_t RegNum) { |
| 344 static const int32_t BaseRegs[] = { |
| 345 #define X(val, encode, name, base, scratch, preserved, stackptr, frameptr, \ |
| 346 isGPR, is64, is32, is16, is8, isXmm, is64To8, is32To8, is16To8, \ |
| 347 isTrunc8Rcvr, isAhRcvr, aliases) \ |
| 348 RegisterSet::base, |
| 349 REGX8632_TABLE |
| 350 #undef X |
| 351 }; |
| 352 assert(RegNum >= 0); |
| 353 assert(RegNum < RegisterSet::Reg_NUM); |
| 354 return BaseRegs[RegNum]; |
| 355 } |
| 356 |
| 357 // Return a register in RegNum's alias set that is suitable for Ty. |
| 358 static int32_t getGprForType(Type Ty, int32_t RegNum) { |
| 359 assert(RegNum != Variable::NoRegister); |
| 360 // TODO(stichnot): Rewrite this as a table lookup from a table computed in a |
| 361 // TargetLowering static initializer. |
| 362 RegNum = getBaseReg(RegNum); |
| 363 if (Ty == IceType_i8 || Ty == IceType_i1) { |
| 364 switch (RegNum) { |
| 365 default: |
| 366 assert(0); |
| 367 case RegisterSet::Reg_eax: |
| 368 return RegisterSet::Reg_al; |
| 369 case RegisterSet::Reg_ecx: |
| 370 return RegisterSet::Reg_cl; |
| 371 case RegisterSet::Reg_edx: |
| 372 return RegisterSet::Reg_dl; |
| 373 case RegisterSet::Reg_ebx: |
| 374 return RegisterSet::Reg_bl; |
| 375 } |
304 } | 376 } |
| 377 if (Ty == IceType_i16) { |
| 378 switch (RegNum) { |
| 379 default: |
| 380 assert(0); |
| 381 case RegisterSet::Reg_eax: |
| 382 return RegisterSet::Reg_ax; |
| 383 case RegisterSet::Reg_ecx: |
| 384 return RegisterSet::Reg_cx; |
| 385 case RegisterSet::Reg_edx: |
| 386 return RegisterSet::Reg_dx; |
| 387 case RegisterSet::Reg_ebx: |
| 388 return RegisterSet::Reg_bx; |
| 389 case RegisterSet::Reg_ebp: |
| 390 return RegisterSet::Reg_bp; |
| 391 case RegisterSet::Reg_esi: |
| 392 return RegisterSet::Reg_si; |
| 393 case RegisterSet::Reg_edi: |
| 394 return RegisterSet::Reg_di; |
| 395 } |
| 396 } |
| 397 return RegNum; |
305 } | 398 } |
306 | 399 |
307 static void initRegisterSet( | 400 static void initRegisterSet( |
308 std::array<llvm::SmallBitVector, IceType_NUM> *TypeToRegisterSet, | 401 std::array<llvm::SmallBitVector, IceType_NUM> *TypeToRegisterSet, |
309 std::array<llvm::SmallBitVector, RegisterSet::Reg_NUM> *RegisterAliases, | 402 std::array<llvm::SmallBitVector, RegisterSet::Reg_NUM> *RegisterAliases, |
310 llvm::SmallBitVector *ScratchRegs) { | 403 llvm::SmallBitVector *ScratchRegs) { |
311 llvm::SmallBitVector IntegerRegisters(RegisterSet::Reg_NUM); | 404 llvm::SmallBitVector IntegerRegistersI32(RegisterSet::Reg_NUM); |
| 405 llvm::SmallBitVector IntegerRegistersI16(RegisterSet::Reg_NUM); |
312 llvm::SmallBitVector IntegerRegistersI8(RegisterSet::Reg_NUM); | 406 llvm::SmallBitVector IntegerRegistersI8(RegisterSet::Reg_NUM); |
313 llvm::SmallBitVector FloatRegisters(RegisterSet::Reg_NUM); | 407 llvm::SmallBitVector FloatRegisters(RegisterSet::Reg_NUM); |
314 llvm::SmallBitVector VectorRegisters(RegisterSet::Reg_NUM); | 408 llvm::SmallBitVector VectorRegisters(RegisterSet::Reg_NUM); |
315 llvm::SmallBitVector InvalidRegisters(RegisterSet::Reg_NUM); | 409 llvm::SmallBitVector InvalidRegisters(RegisterSet::Reg_NUM); |
316 ScratchRegs->resize(RegisterSet::Reg_NUM); | 410 ScratchRegs->resize(RegisterSet::Reg_NUM); |
317 #define X(val, encode, name, name16, name8, scratch, preserved, stackptr, \ | 411 #define X(val, encode, name, base, scratch, preserved, stackptr, frameptr, \ |
318 frameptr, isI8, isInt, isFP) \ | 412 isGPR, is64, is32, is16, is8, isXmm, is64To8, is32To8, is16To8, \ |
319 (IntegerRegisters)[RegisterSet::val] = isInt; \ | 413 isTrunc8Rcvr, isAhRcvr, aliases) \ |
320 (IntegerRegistersI8)[RegisterSet::val] = isI8; \ | 414 (IntegerRegistersI32)[RegisterSet::val] = is32; \ |
321 (FloatRegisters)[RegisterSet::val] = isFP; \ | 415 (IntegerRegistersI16)[RegisterSet::val] = is16; \ |
322 (VectorRegisters)[RegisterSet::val] = isFP; \ | 416 (IntegerRegistersI8)[RegisterSet::val] = is8; \ |
| 417 (FloatRegisters)[RegisterSet::val] = isXmm; \ |
| 418 (VectorRegisters)[RegisterSet::val] = isXmm; \ |
323 (*RegisterAliases)[RegisterSet::val].resize(RegisterSet::Reg_NUM); \ | 419 (*RegisterAliases)[RegisterSet::val].resize(RegisterSet::Reg_NUM); \ |
| 420 for (SizeT RegAlias : aliases) { \ |
| 421 assert(!(*RegisterAliases)[RegisterSet::val][RegAlias] && \ |
| 422 "Duplicate alias for " #val); \ |
| 423 (*RegisterAliases)[RegisterSet::val].set(RegAlias); \ |
| 424 } \ |
324 (*RegisterAliases)[RegisterSet::val].set(RegisterSet::val); \ | 425 (*RegisterAliases)[RegisterSet::val].set(RegisterSet::val); \ |
325 (*ScratchRegs)[RegisterSet::val] = scratch; | 426 (*ScratchRegs)[RegisterSet::val] = scratch; |
326 REGX8632_TABLE; | 427 REGX8632_TABLE; |
327 #undef X | 428 #undef X |
328 | 429 |
329 (*TypeToRegisterSet)[IceType_void] = InvalidRegisters; | 430 (*TypeToRegisterSet)[IceType_void] = InvalidRegisters; |
330 (*TypeToRegisterSet)[IceType_i1] = IntegerRegistersI8; | 431 (*TypeToRegisterSet)[IceType_i1] = IntegerRegistersI8; |
331 (*TypeToRegisterSet)[IceType_i8] = IntegerRegistersI8; | 432 (*TypeToRegisterSet)[IceType_i8] = IntegerRegistersI8; |
332 (*TypeToRegisterSet)[IceType_i16] = IntegerRegisters; | 433 (*TypeToRegisterSet)[IceType_i16] = IntegerRegistersI16; |
333 (*TypeToRegisterSet)[IceType_i32] = IntegerRegisters; | 434 (*TypeToRegisterSet)[IceType_i32] = IntegerRegistersI32; |
334 (*TypeToRegisterSet)[IceType_i64] = IntegerRegisters; | 435 (*TypeToRegisterSet)[IceType_i64] = IntegerRegistersI32; |
335 (*TypeToRegisterSet)[IceType_f32] = FloatRegisters; | 436 (*TypeToRegisterSet)[IceType_f32] = FloatRegisters; |
336 (*TypeToRegisterSet)[IceType_f64] = FloatRegisters; | 437 (*TypeToRegisterSet)[IceType_f64] = FloatRegisters; |
337 (*TypeToRegisterSet)[IceType_v4i1] = VectorRegisters; | 438 (*TypeToRegisterSet)[IceType_v4i1] = VectorRegisters; |
338 (*TypeToRegisterSet)[IceType_v8i1] = VectorRegisters; | 439 (*TypeToRegisterSet)[IceType_v8i1] = VectorRegisters; |
339 (*TypeToRegisterSet)[IceType_v16i1] = VectorRegisters; | 440 (*TypeToRegisterSet)[IceType_v16i1] = VectorRegisters; |
340 (*TypeToRegisterSet)[IceType_v16i8] = VectorRegisters; | 441 (*TypeToRegisterSet)[IceType_v16i8] = VectorRegisters; |
341 (*TypeToRegisterSet)[IceType_v8i16] = VectorRegisters; | 442 (*TypeToRegisterSet)[IceType_v8i16] = VectorRegisters; |
342 (*TypeToRegisterSet)[IceType_v4i32] = VectorRegisters; | 443 (*TypeToRegisterSet)[IceType_v4i32] = VectorRegisters; |
343 (*TypeToRegisterSet)[IceType_v4f32] = VectorRegisters; | 444 (*TypeToRegisterSet)[IceType_v4f32] = VectorRegisters; |
344 } | 445 } |
345 | 446 |
346 static llvm::SmallBitVector | 447 static llvm::SmallBitVector |
347 getRegisterSet(TargetLowering::RegSetMask Include, | 448 getRegisterSet(TargetLowering::RegSetMask Include, |
348 TargetLowering::RegSetMask Exclude) { | 449 TargetLowering::RegSetMask Exclude) { |
349 llvm::SmallBitVector Registers(RegisterSet::Reg_NUM); | 450 llvm::SmallBitVector Registers(RegisterSet::Reg_NUM); |
350 | 451 |
351 #define X(val, encode, name, name16, name8, scratch, preserved, stackptr, \ | 452 #define X(val, encode, name, base, scratch, preserved, stackptr, frameptr, \ |
352 frameptr, isI8, isInt, isFP) \ | 453 isGPR, is64, is32, is16, is8, isXmm, is64To8, is32To8, is16To8, \ |
| 454 isTrunc8Rcvr, isAhRcvr, aliases) \ |
353 if (scratch && (Include & ::Ice::TargetLowering::RegSet_CallerSave)) \ | 455 if (scratch && (Include & ::Ice::TargetLowering::RegSet_CallerSave)) \ |
354 Registers[RegisterSet::val] = true; \ | 456 Registers[RegisterSet::val] = true; \ |
355 if (preserved && (Include & ::Ice::TargetLowering::RegSet_CalleeSave)) \ | 457 if (preserved && (Include & ::Ice::TargetLowering::RegSet_CalleeSave)) \ |
356 Registers[RegisterSet::val] = true; \ | 458 Registers[RegisterSet::val] = true; \ |
357 if (stackptr && (Include & ::Ice::TargetLowering::RegSet_StackPointer)) \ | 459 if (stackptr && (Include & ::Ice::TargetLowering::RegSet_StackPointer)) \ |
358 Registers[RegisterSet::val] = true; \ | 460 Registers[RegisterSet::val] = true; \ |
359 if (frameptr && (Include & ::Ice::TargetLowering::RegSet_FramePointer)) \ | 461 if (frameptr && (Include & ::Ice::TargetLowering::RegSet_FramePointer)) \ |
360 Registers[RegisterSet::val] = true; \ | 462 Registers[RegisterSet::val] = true; \ |
361 if (scratch && (Exclude & ::Ice::TargetLowering::RegSet_CallerSave)) \ | 463 if (scratch && (Exclude & ::Ice::TargetLowering::RegSet_CallerSave)) \ |
362 Registers[RegisterSet::val] = false; \ | 464 Registers[RegisterSet::val] = false; \ |
(...skipping 24 matching lines...) Expand all Loading... |
387 // performance, not correctness. | 489 // performance, not correctness. |
388 static const unsigned MaxEquivalenceClassSize = 8; | 490 static const unsigned MaxEquivalenceClassSize = 8; |
389 using RegisterList = llvm::SmallVector<int32_t, MaxEquivalenceClassSize>; | 491 using RegisterList = llvm::SmallVector<int32_t, MaxEquivalenceClassSize>; |
390 using EquivalenceClassMap = std::map<uint32_t, RegisterList>; | 492 using EquivalenceClassMap = std::map<uint32_t, RegisterList>; |
391 EquivalenceClassMap EquivalenceClasses; | 493 EquivalenceClassMap EquivalenceClasses; |
392 SizeT NumShuffled = 0, NumPreserved = 0; | 494 SizeT NumShuffled = 0, NumPreserved = 0; |
393 | 495 |
394 // Build up the equivalence classes of registers by looking at the register | 496 // Build up the equivalence classes of registers by looking at the register |
395 // properties as well as whether the registers should be explicitly excluded | 497 // properties as well as whether the registers should be explicitly excluded |
396 // from shuffling. | 498 // from shuffling. |
397 #define X(val, encode, name, name16, name8, scratch, preserved, stackptr, \ | 499 #define X(val, encode, name, base, scratch, preserved, stackptr, frameptr, \ |
398 frameptr, isI8, isInt, isFP) \ | 500 isGPR, is64, is32, is16, is8, isXmm, is64To8, is32To8, is16To8, \ |
| 501 isTrunc8Rcvr, isAhRcvr, aliases) \ |
399 if (ExcludeRegisters[RegisterSet::val]) { \ | 502 if (ExcludeRegisters[RegisterSet::val]) { \ |
400 /* val stays the same in the resulting permutation. */ \ | 503 /* val stays the same in the resulting permutation. */ \ |
401 Permutation[RegisterSet::val] = RegisterSet::val; \ | 504 Permutation[RegisterSet::val] = RegisterSet::val; \ |
402 ++NumPreserved; \ | 505 ++NumPreserved; \ |
403 } else { \ | 506 } else { \ |
404 const uint32_t Index = (scratch << 0) | (preserved << 1) | (isI8 << 2) | \ | 507 uint32_t AttrKey = 0; \ |
405 (isInt << 3) | (isFP << 4); \ | 508 uint32_t Index = 0; \ |
| 509 /* Combine relevant attributes into an equivalence class key. */ \ |
| 510 Index |= (scratch << (AttrKey++)); \ |
| 511 Index |= (preserved << (AttrKey++)); \ |
| 512 Index |= (is8 << (AttrKey++)); \ |
| 513 Index |= (is16 << (AttrKey++)); \ |
| 514 Index |= (is32 << (AttrKey++)); \ |
| 515 Index |= (isXmm << (AttrKey++)); \ |
406 /* val is assigned to an equivalence class based on its properties. */ \ | 516 /* val is assigned to an equivalence class based on its properties. */ \ |
407 EquivalenceClasses[Index].push_back(RegisterSet::val); \ | 517 EquivalenceClasses[Index].push_back(RegisterSet::val); \ |
408 } | 518 } |
409 REGX8632_TABLE | 519 REGX8632_TABLE |
410 #undef X | 520 #undef X |
411 | 521 |
412 // Create a random number generator for regalloc randomization. | 522 // Create a random number generator for regalloc randomization. |
413 RandomNumberGenerator RNG(Ctx->getFlags().getRandomSeed(), | 523 RandomNumberGenerator RNG(Ctx->getFlags().getRandomSeed(), |
414 RPE_RegAllocRandomization, Salt); | 524 RPE_RegAllocRandomization, Salt); |
415 RandomNumberGeneratorWrapper RNGW(RNG); | 525 RandomNumberGeneratorWrapper RNGW(RNG); |
(...skipping 16 matching lines...) Expand all Loading... |
432 Ostream &Str = Func->getContext()->getStrDump(); | 542 Ostream &Str = Func->getContext()->getStrDump(); |
433 Str << "Register equivalence classes:\n"; | 543 Str << "Register equivalence classes:\n"; |
434 for (auto I : EquivalenceClasses) { | 544 for (auto I : EquivalenceClasses) { |
435 Str << "{"; | 545 Str << "{"; |
436 const RegisterList &List = I.second; | 546 const RegisterList &List = I.second; |
437 bool First = true; | 547 bool First = true; |
438 for (int32_t Register : List) { | 548 for (int32_t Register : List) { |
439 if (!First) | 549 if (!First) |
440 Str << " "; | 550 Str << " "; |
441 First = false; | 551 First = false; |
442 Str << getRegName(Register, IceType_i32); | 552 Str << getRegName(Register); |
443 } | 553 } |
444 Str << "}\n"; | 554 Str << "}\n"; |
445 } | 555 } |
446 } | 556 } |
447 } | 557 } |
448 | 558 |
449 /// The maximum number of arguments to pass in XMM registers | 559 /// The maximum number of arguments to pass in XMM registers |
450 static const uint32_t X86_MAX_XMM_ARGS = 4; | 560 static const uint32_t X86_MAX_XMM_ARGS = 4; |
451 /// The number of bits in a byte | 561 /// The number of bits in a byte |
452 static const uint32_t X86_CHAR_BIT = 8; | 562 static const uint32_t X86_CHAR_BIT = 8; |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 | 841 |
732 } // end of namespace X86Internal | 842 } // end of namespace X86Internal |
733 | 843 |
734 namespace X8632 { | 844 namespace X8632 { |
735 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8632>; | 845 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8632>; |
736 } // end of namespace X8632 | 846 } // end of namespace X8632 |
737 | 847 |
738 } // end of namespace Ice | 848 } // end of namespace Ice |
739 | 849 |
740 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632TRAITS_H | 850 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632TRAITS_H |
OLD | NEW |