summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2013-01-07 03:20:02 +0000
committerChandler Carruth <chandlerc@gmail.com>2013-01-07 03:20:02 +0000
commitbb00800ff46e7a2a628d0a6741a7f0422c74c198 (patch)
tree5451ac559c49dcfcbdcc2ce04157e8de716118ff
parentd1b8ef97c47d347f2a2261a0d6de4872f248321f (diff)
downloadllvm-bb00800ff46e7a2a628d0a6741a7f0422c74c198.tar.gz
llvm-bb00800ff46e7a2a628d0a6741a7f0422c74c198.tar.bz2
llvm-bb00800ff46e7a2a628d0a6741a7f0422c74c198.tar.xz
Fix the enumerator names for ShuffleKind to match tho coding standards,
and make its comments doxygen comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171688 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Analysis/TargetTransformInfo.h9
-rw-r--r--lib/Target/X86/X86TargetTransformInfo.cpp2
-rw-r--r--lib/Transforms/Vectorize/LoopVectorize.cpp4
3 files changed, 8 insertions, 7 deletions
diff --git a/include/llvm/Analysis/TargetTransformInfo.h b/include/llvm/Analysis/TargetTransformInfo.h
index a421bf60d4..ddf615fe3b 100644
--- a/include/llvm/Analysis/TargetTransformInfo.h
+++ b/include/llvm/Analysis/TargetTransformInfo.h
@@ -135,11 +135,12 @@ public:
/// \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.
diff --git a/lib/Target/X86/X86TargetTransformInfo.cpp b/lib/Target/X86/X86TargetTransformInfo.cpp
index 8a699afa6a..9cc1b180e9 100644
--- a/lib/Target/X86/X86TargetTransformInfo.cpp
+++ b/lib/Target/X86/X86TargetTransformInfo.cpp
@@ -204,7 +204,7 @@ unsigned X86TTI::getArithmeticInstrCost(unsigned Opcode, Type *Ty) const {
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);
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp
index 6a26bef89c..17d9eb1d7c 100644
--- a/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -2437,7 +2437,7 @@ LoopVectorizationCostModel::getInstructionCost(Instruction *I, unsigned VF) {
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 @@ LoopVectorizationCostModel::getInstructionCost(Instruction *I, unsigned VF) {
LI->getAlignment(),
LI->getPointerAddressSpace());
if (Reverse)
- Cost += TTI->getShuffleCost(TargetTransformInfo::Reverse,
+ Cost += TTI->getShuffleCost(TargetTransformInfo::SK_Reverse,
VectorTy, 0);
return Cost;
}