llvm-6502/test
Karthik Bhat 52610d84ad Add a new pass "Loop Interchange"
This pass interchanges loops to provide a more cache-friendly memory access.

For e.g. given a loop like -
  for(int i=0;i<N;i++)
    for(int j=0;j<N;j++)
      A[j][i] = A[j][i]+B[j][i];

is interchanged to -
  for(int j=0;j<N;j++)
    for(int i=0;i<N;i++)
      A[j][i] = A[j][i]+B[j][i];

This pass is currently disabled by default.

To give a brief introduction it consists of 3 stages-

LoopInterchangeLegality : Checks the legality of loop interchange based on Dependency matrix.
LoopInterchangeProfitability: A very basic heuristic has been added to check for profitibility. This will evolve over time.
LoopInterchangeTransform : Which does the actual transform.

LNT Performance tests shows improvement in Polybench/linear-algebra/kernels/mvt and Polybench/linear-algebra/kernels/gemver becnmarks.

TODO:
1) Add support for reductions and lcssa phi.
2) Improve profitability model.
3) Improve loop selection algorithm to select best loop for interchange. Currently the innermost loop is selected for interchange.
4) Improve compile time regression found in llvm lnt due to this pass.
5) Fix issues in Dependency Analysis module.

A special thanks to Hal for reviewing this code.
Review: http://reviews.llvm.org/D7499




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231458 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 10:11:25 +00:00
..
Analysis [SCEV] make SCEV smarter about proving no-wrap. 2015-03-04 22:24:17 +00:00
Assembler DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
Bindings DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
Bitcode Make DataLayout Non-Optional in the Module 2015-03-04 18:43:29 +00:00
BugPoint DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
CodeGen LegalizeTypes: Handle shift by 0 in ExpandShiftByConstant. 2015-03-06 01:13:01 +00:00
DebugInfo Use the existing begin and end symbol for debug info. 2015-03-05 02:05:42 +00:00
ExecutionEngine [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
Feature DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
FileCheck FileCheck: Add CHECK-SAME 2015-02-26 04:53:00 +00:00
Instrumentation [sanitizer] add nosanitize metadata to more coverage instrumentation instructions 2015-03-05 01:20:05 +00:00
Integer [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
JitListener DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
Linker Remember to move a type to the correct set when setting the body. 2015-03-06 00:50:21 +00:00
LTO [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
MC X86: Form IMGREL relocations for LLVM Functions 2015-03-06 08:11:32 +00:00
Object Make llvm/test/Object/archive-format.test CRLF-tolerant. 2015-03-03 15:54:48 +00:00
Other Make DataLayout Non-Optional in the Module 2015-03-04 18:43:29 +00:00
SymbolRewriter
TableGen
tools [dsymutil] Add minimal code to emit DIE trees. 2015-03-04 22:07:44 +00:00
Transforms Add a new pass "Loop Interchange" 2015-03-06 10:11:25 +00:00
Unit
Verifier Replace llvm.frameallocate with llvm.frameescape 2015-03-05 18:26:34 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg Change SystemZ large tests to use the existing long_tests property 2015-03-02 19:34:11 +00:00
lit.site.cfg.in Remove log statements from config scripts. 2015-02-22 07:31:42 +00:00
Makefile Attempt to fix the builders. 2015-02-22 07:01:41 +00:00
Makefile.tests
TestRunner.sh