[PATCH] [Patch] Loop Interchange Pass
Karthik Bhat
kv.bhat at samsung.com
Mon Feb 9 05:25:12 PST 2015
Hi hfinkel, jmolloy, pekka.jaaskelainen,
Hi All,
Please find attached the patch for Loop Interchange Pass for llvm. Initial RFC and design was submitted at http://reviews.llvm.org/D7432 .
This pass is disabled by default.
To give a brief intorduction it consists of 3 stages-
1) LoopInterchangeLegality : Checks the legality of loop interchange based on distance/direction vector.
2) LoopInterchangeProfitability: A very basic heuristic has been added to check for profitibility. This will evolve over time.
3) LoopInterchangeTransform : Which does the actual transform.
Current Limitation:
1) Only handles leve 2 loops for now. Will extend it going forward to support any level of loops as James had suggested during RFC.
2) Triangular loops are not yet supported.
As Hal had suggested during RFC i went through TSVC Benchmark. Unfortunetly i didnt get time to run it but i went through the test case for loop interchange. One of the test cases s231() which was not being vectorized previously now gets vectorized. Added a similar test case in this patch.
This patch seems to be working fine and producing correct result (i.e. interchanging doesn't change the o/p of the program) to best of my knowledge.
Wanted some comments on how to go about writing test cases for this transform? Please let me know your inputs of this.
Also is it ok to do further development on trunk once this patch is finalized?
Thanks and Regards
Karthik Bhat
REPOSITORY
rL LLVM
http://reviews.llvm.org/D7499
Files:
include/llvm/InitializePasses.h
include/llvm/LinkAllPasses.h
include/llvm/Transforms/Scalar.h
lib/Transforms/Scalar/CMakeLists.txt
lib/Transforms/Scalar/LoopInterchange.cpp
lib/Transforms/Scalar/Scalar.cpp
test/Transforms/LoopInterchange/dependence.ll
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7499.19574.patch
Type: text/x-patch
Size: 36835 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150209/47070317/attachment.bin>
More information about the llvm-commits
mailing list