OLD | NEW |
1 //===- subzero/src/IceTargetLoweringX8664Traits.h - x86-64 traits -*- C++ -*-=// | 1 //===- subzero/src/IceTargetLoweringX8664Traits.h - x86-64 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 llvm::SmallVectorImpl<int32_t> &Permutation, | 403 llvm::SmallVectorImpl<int32_t> &Permutation, |
404 const llvm::SmallBitVector &ExcludeRegisters, | 404 const llvm::SmallBitVector &ExcludeRegisters, |
405 uint64_t Salt) { | 405 uint64_t Salt) { |
406 // TODO(stichnot): Declaring Permutation this way loses type/size | 406 // TODO(stichnot): Declaring Permutation this way loses type/size |
407 // information. Fix this in conjunction with the caller-side TODO. | 407 // information. Fix this in conjunction with the caller-side TODO. |
408 assert(Permutation.size() >= RegisterSet::Reg_NUM); | 408 assert(Permutation.size() >= RegisterSet::Reg_NUM); |
409 // Expected upper bound on the number of registers in a single equivalence | 409 // Expected upper bound on the number of registers in a single equivalence |
410 // class. For x86-64, this would comprise the 16 XMM registers. This is | 410 // class. For x86-64, this would comprise the 16 XMM registers. This is |
411 // for performance, not correctness. | 411 // for performance, not correctness. |
412 static const unsigned MaxEquivalenceClassSize = 8; | 412 static const unsigned MaxEquivalenceClassSize = 8; |
413 typedef llvm::SmallVector<int32_t, MaxEquivalenceClassSize> RegisterList; | 413 using RegisterList = llvm::SmallVector<int32_t, MaxEquivalenceClassSize>; |
414 typedef std::map<uint32_t, RegisterList> EquivalenceClassMap; | 414 using EquivalenceClassMap = std::map<uint32_t, RegisterList>; |
415 EquivalenceClassMap EquivalenceClasses; | 415 EquivalenceClassMap EquivalenceClasses; |
416 SizeT NumShuffled = 0, NumPreserved = 0; | 416 SizeT NumShuffled = 0, NumPreserved = 0; |
417 | 417 |
418 // Build up the equivalence classes of registers by looking at the register | 418 // Build up the equivalence classes of registers by looking at the register |
419 // properties as well as whether the registers should be explicitly excluded | 419 // properties as well as whether the registers should be explicitly excluded |
420 // from shuffling. | 420 // from shuffling. |
421 #define X(val, encode, name64, name32, name16, name8, scratch, preserved, \ | 421 #define X(val, encode, name64, name32, name16, name8, scratch, preserved, \ |
422 stackptr, frameptr, isInt, isFP) \ | 422 stackptr, frameptr, isInt, isFP) \ |
423 if (ExcludeRegisters[RegisterSet::val]) { \ | 423 if (ExcludeRegisters[RegisterSet::val]) { \ |
424 /* val stays the same in the resulting permutation. */ \ | 424 /* val stays the same in the resulting permutation. */ \ |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 | 748 |
749 } // end of namespace X86Internal | 749 } // end of namespace X86Internal |
750 | 750 |
751 namespace X8664 { | 751 namespace X8664 { |
752 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8664>; | 752 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8664>; |
753 } // end of namespace X8664 | 753 } // end of namespace X8664 |
754 | 754 |
755 } // end of namespace Ice | 755 } // end of namespace Ice |
756 | 756 |
757 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8664TRAITS_H | 757 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8664TRAITS_H |
OLD | NEW |