aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Vectorize/LoopVectorize.h
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2012-12-13 00:21:03 +0000
committerNadav Rotem <nrotem@apple.com>2012-12-13 00:21:03 +0000
commit807dad62a0d4f1a1bbcb76fdc447634f76308252 (patch)
treef07247748fd355f3889388def6063e8624e51ad7 /lib/Transforms/Vectorize/LoopVectorize.h
parent0fabd08066a29f4e5060539d0d0605cbfe2760b8 (diff)
Teach the cost model about the optimization in r169904: Truncation of induction variables costs the same as scalar trunc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170051 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Vectorize/LoopVectorize.h')
-rw-r--r--lib/Transforms/Vectorize/LoopVectorize.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Transforms/Vectorize/LoopVectorize.h b/lib/Transforms/Vectorize/LoopVectorize.h
index e5a5259605..e5ef29052e 100644
--- a/lib/Transforms/Vectorize/LoopVectorize.h
+++ b/lib/Transforms/Vectorize/LoopVectorize.h
@@ -320,6 +320,9 @@ public:
/// Returns the induction variables found in the loop.
InductionList *getInductionVars() { return &Inductions; }
+ /// Returns True if V is an induction variable in this loop.
+ bool isInductionVariable(const Value *V);
+
/// Return true if the block BB needs to be predicated in order for the loop
/// to be vectorized.
bool blockNeedsPredication(BasicBlock *BB);