summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2013-11-02 12:59:39 +0000
committerTobias Grosser <tobias@grosser.es>2013-11-02 12:59:39 +0000
commit2ea6deb62f08003fcd42aedf8d2ce52faa4a74e0 (patch)
tree0dc77d89c5da3f069ec9606a3b0de1856598c80f
parent2a779d1fae3ea0e554293ba79b4cad4611e5fdfd (diff)
downloadbcm5719-llvm-2ea6deb62f08003fcd42aedf8d2ce52faa4a74e0.tar.gz
bcm5719-llvm-2ea6deb62f08003fcd42aedf8d2ce52faa4a74e0.zip
IslCodegen: Do not build upper bound in vector for
For for-nodes that are translated to a set of vector lanes, we already know the overall number of iterations. Calculating the upper bound is consequently not necessary. This change removes the code for upper bound calculation, which was probably copy/pasted from the code generation for the normal for-loop. This issue was found by Sylvestre's scan-build server. llvm-svn: 193925
-rw-r--r--polly/lib/CodeGen/IslCodeGeneration.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp
index ed64fd6b129..465d1101d3a 100644
--- a/polly/lib/CodeGen/IslCodeGeneration.cpp
+++ b/polly/lib/CodeGen/IslCodeGeneration.cpp
@@ -706,22 +706,16 @@ void IslNodeBuilder::createForVector(__isl_take isl_ast_node *For,
isl_ast_expr *Inc = isl_ast_node_for_get_inc(For);
isl_ast_expr *Iterator = isl_ast_node_for_get_iterator(For);
isl_id *IteratorID = isl_ast_expr_get_id(Iterator);
- CmpInst::Predicate Predicate;
- isl_ast_expr *UB = getUpperBound(For, Predicate);
Value *ValueLB = ExprBuilder.create(Init);
- Value *ValueUB = ExprBuilder.create(UB);
Value *ValueInc = ExprBuilder.create(Inc);
Type *MaxType = ExprBuilder.getType(Iterator);
MaxType = ExprBuilder.getWidestType(MaxType, ValueLB->getType());
- MaxType = ExprBuilder.getWidestType(MaxType, ValueUB->getType());
MaxType = ExprBuilder.getWidestType(MaxType, ValueInc->getType());
if (MaxType != ValueLB->getType())
ValueLB = Builder.CreateSExt(ValueLB, MaxType);
- if (MaxType != ValueUB->getType())
- ValueUB = Builder.CreateSExt(ValueUB, MaxType);
if (MaxType != ValueInc->getType())
ValueInc = Builder.CreateSExt(ValueInc, MaxType);
OpenPOWER on IntegriCloud