[llvm-commits] [llvm] r171688 - in /llvm/trunk: include/llvm/Analysis/TargetTransformInfo.h lib/Target/X86/X86TargetTransformInfo.cpp lib/Transforms/Vectorize/LoopVectorize.cpp
Chandler Carruth
chandlerc at gmail.com
Sun Jan 6 19:20:02 PST 2013
Author: chandlerc
Date: Sun Jan 6 21:20:02 2013
New Revision: 171688
URL: http://llvm.org/viewvc/llvm-project?rev=171688&view=rev
Log:
Fix the enumerator names for ShuffleKind to match tho coding standards,
and make its comments doxygen comments.
Modified:
llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h
llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp
llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
Modified: llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h?rev=171688&r1=171687&r2=171688&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h Sun Jan 6 21:20:02 2013
@@ -135,11 +135,12 @@
/// \name Vector Target Information
/// @{
+ /// \brief The various kinds of shuffle patterns for vector queries.
enum ShuffleKind {
- Broadcast, // Broadcast element 0 to all other elements.
- Reverse, // Reverse the order of the vector.
- InsertSubvector, // InsertSubvector. Index indicates start offset.
- ExtractSubvector // ExtractSubvector Index indicates start offset.
+ SK_Broadcast, ///< Broadcast element 0 to all other elements.
+ SK_Reverse, ///< Reverse the order of the vector.
+ SK_InsertSubvector, ///< InsertSubvector. Index indicates start offset.
+ SK_ExtractSubvector ///< ExtractSubvector Index indicates start offset.
};
/// \return The number of scalar or vector registers that the target has.
Modified: llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp?rev=171688&r1=171687&r2=171688&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp Sun Jan 6 21:20:02 2013
@@ -204,7 +204,7 @@
unsigned X86TTI::getShuffleCost(ShuffleKind Kind, Type *Tp, int Index,
Type *SubTp) const {
// We only estimate the cost of reverse shuffles.
- if (Kind != Reverse)
+ if (Kind != SK_Reverse)
return TargetTransformInfo::getShuffleCost(Kind, Tp, Index, SubTp);
std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(Tp);
Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=171688&r1=171687&r2=171688&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Sun Jan 6 21:20:02 2013
@@ -2437,7 +2437,7 @@
SI->getAlignment(),
SI->getPointerAddressSpace());
if (Reverse)
- Cost += TTI->getShuffleCost(TargetTransformInfo::Reverse,
+ Cost += TTI->getShuffleCost(TargetTransformInfo::SK_Reverse,
VectorTy, 0);
return Cost;
}
@@ -2479,7 +2479,7 @@
LI->getAlignment(),
LI->getPointerAddressSpace());
if (Reverse)
- Cost += TTI->getShuffleCost(TargetTransformInfo::Reverse,
+ Cost += TTI->getShuffleCost(TargetTransformInfo::SK_Reverse,
VectorTy, 0);
return Cost;
}
More information about the llvm-commits
mailing list