[PATCH] [Polly][Fix] Teach the IslExprBuilder about vector lanes
tobias at grosser.es
Fri Oct 10 08:17:49 PDT 2014
the general idea of the patch is fine, but I feel a little uncomfortable to teach the IslExprBuilder about vectorization. Vectorization logic does not really seem related to code generating an isl expression.
Instead of checking for the VectorLoopId in the ExprBuilder and adjusting it there, would it make sense to (temporarily) update the IDToValueMap of the IslExprBuilder to contain the right value?
I did not fully think this trough in terms of code, but wanted to get the review out quick as the bug I found may save you some time. Please let me know what you think regarding the comment above.
Comment at: lib/CodeGen/IslExprBuilder.cpp:450
@@ +449,3 @@
+ Value *Offset = ConstantInt::get(V->getType(), VectorLane);
+ V = Builder.CreateAdd(V, Offset);
This seems incorrect in case the vector loop has a stride > 1. You would need to add Stride * VectorLane, I suppose.
More information about the llvm-commits