1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00
llvm-mirror/lib
Karthik Bhat 78ffabf782 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

llvm-svn: 231458
2015-03-06 10:11:25 +00:00
..
Analysis Teach ComputeNumSignBits about signed reminder. 2015-03-06 00:23:58 +00:00
AsmParser Revert "unique_ptrify ValID::ConstantStructElts" 2015-03-04 18:31:10 +00:00
Bitcode Add missing includes. make_unique proliferated everywhere. 2015-03-01 21:28:53 +00:00
CodeGen LegalizeTypes: Handle shift by 0 in ExpandShiftByConstant. 2015-03-06 01:13:01 +00:00
DebugInfo DWARFFormValue: Add getAsSignedConstant method. 2015-03-04 22:07:41 +00:00
ExecutionEngine Make DataLayout Non-Optional in the Module 2015-03-04 18:43:29 +00:00
Fuzzer [sanitizer/coverage] Add AFL-style coverage counters (search heuristic for fuzzing). 2015-03-03 23:27:02 +00:00
IR Instructions: Use delegated constructors to reduce duplication 2015-03-05 22:05:26 +00:00
IRReader Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
LineEditor Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +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 Make DataLayout Non-Optional in the Module 2015-03-04 18:43:29 +00:00
MC Use the generic Lfunc_begin label on ppc. 2015-03-05 18:55:50 +00:00
Object Make DataLayout Non-Optional in the Module 2015-03-04 18:43:29 +00:00
Option Remove explicit no-op dtor in favor of the implicit dtor so as not to disable/deprecate the copy operations. 2015-03-03 19:53:02 +00:00
ProfileData Add missing includes. make_unique proliferated everywhere. 2015-03-01 21:28:53 +00:00
Support Support: Improve performance of FileOutputBuffer on Windows 2015-03-06 06:07:32 +00:00
TableGen Add missing includes. make_unique proliferated everywhere. 2015-03-01 21:28:53 +00:00
Target X86: Form IMGREL relocations for LLVM Functions 2015-03-06 08:11:32 +00:00
Transforms Add a new pass "Loop Interchange" 2015-03-06 10:11:25 +00:00
CMakeLists.txt Reverting r227452, which adds back the fuzzer library. Now excluding the fuzzer library based on LLVM_USE_SANITIZE_COVERAGE being set or unset. 2015-01-29 16:58:29 +00:00
LLVMBuild.txt
Makefile Move DebugInfo to DebugInfo/DWARF. 2015-01-30 18:07:45 +00:00