[PATCH] [Patch] Loop Interchange Pass

Karthik Bhat kv.bhat at samsung.com
Sun Feb 22 09:20:11 PST 2015


Hi Hal,
I had some time to work on generic version of loop interchange to support any depth. This updated patch supports loops of any depth. 
The loop selection algorithm currently selects the innermost loop for interchange. Going forward we can improve this heuristic to select the most profitable loop based on Dependency matrix.
To keep it simple in the first version loops with LCSSA phi are currently not handled. I will work on handling them in later iterations. 
The legality and profitability logic is pretty much the same. We use dependency matrix to conclude legality of interchange of 2 loops.

One of the TSVC benchmark test case (s231) gives 2X improvement with this patch.

I ran llvm lnt performance tests based on http://llvm.org/docs/lnt/quickstart.html#running-tests with sample size of 3 but every time i see a lot of variations in the results. I will try to run lnt with larger sample size and update the results here.

It would be great if you could let me know your inputs on this patch.

P.S. Are there any build bots which we can use to run llvm lnt/performance tests for this patch?

Thanks and Regards
Karthik Bhat


http://reviews.llvm.org/D7499

Files:
  include/llvm/InitializePasses.h
  include/llvm/LinkAllPasses.h
  include/llvm/Transforms/Scalar.h
  lib/Analysis/DependenceAnalysis.cpp
  lib/Transforms/IPO/PassManagerBuilder.cpp
  lib/Transforms/Scalar/CMakeLists.txt
  lib/Transforms/Scalar/LoopInterchange.cpp
  lib/Transforms/Scalar/Scalar.cpp
  test/Transforms/LoopInterchange/currentLimitation.ll
  test/Transforms/LoopInterchange/interchange.ll
  test/Transforms/LoopInterchange/profitability.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7499.20478.patch
Type: text/x-patch
Size: 80633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150222/aaa57ff1/attachment.bin>


More information about the llvm-commits mailing list