aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
authorHongbin Zheng <etherzhhb@gmail.com>2012-04-07 03:56:23 +0000
committerHongbin Zheng <etherzhhb@gmail.com>2012-04-07 03:56:23 +0000
commit86312cc15f29ce2bbd9647b94862e068045280c3 (patch)
tree458d2c2004d960a5644650a53daf1ca306869756 /lib/Transforms
parent847307a35b33bf3b9c68510c71b41794de9f2cca (diff)
downloadexternal_llvm-86312cc15f29ce2bbd9647b94862e068045280c3.zip
external_llvm-86312cc15f29ce2bbd9647b94862e068045280c3.tar.gz
external_llvm-86312cc15f29ce2bbd9647b94862e068045280c3.tar.bz2
Refactor: Use positive field names in VectorizeConfig.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Vectorize/BBVectorize.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/lib/Transforms/Vectorize/BBVectorize.cpp b/lib/Transforms/Vectorize/BBVectorize.cpp
index 82be697..286b54f 100644
--- a/lib/Transforms/Vectorize/BBVectorize.cpp
+++ b/lib/Transforms/Vectorize/BBVectorize.cpp
@@ -437,9 +437,9 @@ namespace {
case Intrinsic::exp:
case Intrinsic::exp2:
case Intrinsic::pow:
- return !Config.NoMath;
+ return Config.VectorizeMath;
case Intrinsic::fma:
- return !Config.NoFMA;
+ return Config.VectorizeFMA;
}
}
@@ -533,16 +533,16 @@ namespace {
} else if (LoadInst *L = dyn_cast<LoadInst>(I)) {
// Vectorize simple loads if possbile:
IsSimpleLoadStore = L->isSimple();
- if (!IsSimpleLoadStore || Config.NoMemOps)
+ if (!IsSimpleLoadStore || !Config.VectorizeMemOps)
return false;
} else if (StoreInst *S = dyn_cast<StoreInst>(I)) {
// Vectorize simple stores if possbile:
IsSimpleLoadStore = S->isSimple();
- if (!IsSimpleLoadStore || Config.NoMemOps)
+ if (!IsSimpleLoadStore || !Config.VectorizeMemOps)
return false;
} else if (CastInst *C = dyn_cast<CastInst>(I)) {
// We can vectorize casts, but not casts of pointer types, etc.
- if (Config.NoCasts)
+ if (!Config.VectorizeCasts)
return false;
Type *SrcTy = C->getSrcTy();
@@ -582,10 +582,12 @@ namespace {
!(VectorType::isValidElementType(T2) || T2->isVectorTy()))
return false;
- if (Config.NoInts && (T1->isIntOrIntVectorTy() || T2->isIntOrIntVectorTy()))
+ if (!Config.VectorizeInts
+ && (T1->isIntOrIntVectorTy() || T2->isIntOrIntVectorTy()))
return false;
- if (Config.NoFloats && (T1->isFPOrFPVectorTy() || T2->isFPOrFPVectorTy()))
+ if (!Config.VectorizeFloats
+ && (T1->isFPOrFPVectorTy() || T2->isFPOrFPVectorTy()))
return false;
if (T1->getPrimitiveSizeInBits() > Config.VectorBits/2 ||
@@ -1887,12 +1889,12 @@ llvm::vectorizeBasicBlock(Pass *P, BasicBlock &BB, const VectorizeConfig &C) {
//===----------------------------------------------------------------------===//
VectorizeConfig::VectorizeConfig() {
VectorBits = ::VectorBits;
- NoInts = ::NoInts;
- NoFloats = ::NoFloats;
- NoCasts = ::NoCasts;
- NoMath = ::NoMath;
- NoFMA = ::NoFMA;
- NoMemOps = ::NoMemOps;
+ VectorizeInts = !::NoInts;
+ VectorizeFloats = !::NoFloats;
+ VectorizeCasts = !::NoCasts;
+ VectorizeMath = !::NoMath;
+ VectorizeFMA = !::NoFMA;
+ VectorizeMemOps = !::NoMemOps;
AlignedOnly = ::AlignedOnly;
ReqChainDepth= ::ReqChainDepth;
SearchLimit = ::SearchLimit;