llvm-6502/lib/Transforms
Hao Liu 43be1d53d1 [LoopVectorize] Teach Loop Vectorizor about interleaved memory accesses.
Interleaved memory accesses are grouped and vectorized into vector load/store and shufflevector.
E.g. for (i = 0; i < N; i+=2) {
       a = A[i];         // load of even element
       b = A[i+1];       // load of odd element
       ...               // operations on a, b, c, d
       A[i] = c;         // store of even element
       A[i+1] = d;       // store of odd element
     }

  The loads of even and odd elements are identified as an interleave load group, which will be transfered into vectorized IRs like:
     %wide.vec = load <8 x i32>, <8 x i32>* %ptr
     %vec.even = shufflevector <8 x i32> %wide.vec, <8 x i32> undef, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
     %vec.odd = shufflevector <8 x i32> %wide.vec, <8 x i32> undef, <4 x i32> <i32 1, i32 3, i32 5, i32 7>

  The stores of even and odd elements are identified as an interleave store group, which will be transfered into vectorized IRs like:
     %interleaved.vec = shufflevector <4 x i32> %vec.even, %vec.odd, <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7> 
     store <8 x i32> %interleaved.vec, <8 x i32>* %ptr

This optimization is currently disabled by defaut. To try it by adding '-enable-interleaved-mem-accesses=true'. 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239291 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-08 06:39:56 +00:00
..
Hello [CMake] Add LLVM_LINK_COMPONENTS to loadable modules, LLVMHello and BugpointPasses, on Win32. 2014-07-13 13:36:48 +00:00
InstCombine [InstCombine, InstSimplify] Move xforms from Combine to Simplify 2015-06-06 22:40:21 +00:00
Instrumentation Tidy code in InstrProfiling.cpp. NFC. 2015-06-04 11:45:32 +00:00
IPO [PM/AA] Start refactoring AliasAnalysis to remove the analysis group and 2015-06-04 02:03:15 +00:00
ObjCARC [PM/AA] Start refactoring AliasAnalysis to remove the analysis group and 2015-06-04 02:03:15 +00:00
Scalar Remove SCEVCache and FindConstantPointers from complete loop unrolling heuristic. 2015-06-08 03:28:06 +00:00
Utils [LoopVectorize] Don't crash on zero-sized types in isInductionPHI 2015-06-05 10:52:40 +00:00
Vectorize [LoopVectorize] Teach Loop Vectorizor about interleaved memory accesses. 2015-06-08 06:39:56 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile