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

Side by Side Diff: src/IceTargetLoweringX8664Traits.h

Issue 1343843003: Refactor all instances of `typedef y x` to the C++11 `using x = y` syntax. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 3 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/IceTargetLoweringX8664.cpp ('k') | src/IceTargetLoweringX86Base.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/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
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
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
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8664.cpp ('k') | src/IceTargetLoweringX86Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698