Skip to content
  1. Apr 20, 2013
  2. Apr 19, 2013
  3. Apr 18, 2013
  4. Apr 16, 2013
  5. Apr 15, 2013
  6. Apr 14, 2013
  7. Apr 12, 2013
  8. Apr 11, 2013
  9. Apr 10, 2013
  10. Apr 09, 2013
    • Nadav Rotem's avatar
      Add support for bottom-up SLP vectorization infrastructure. · 2d9dec32
      Nadav Rotem authored
      This commit adds the infrastructure for performing bottom-up SLP vectorization (and other optimizations) on parallel computations.
      The infrastructure has three potential users:
      
        1. The loop vectorizer needs to be able to vectorize AOS data structures such as (sum += A[i] + A[i+1]).
      
        2. The BB-vectorizer needs this infrastructure for bottom-up SLP vectorization, because bottom-up vectorization is faster to compute.
      
        3. A loop-roller needs to be able to analyze consecutive chains and roll them into a loop, in order to reduce code size. A loop roller does not need to create vector instructions, and this infrastructure separates the chain analysis from the vectorization.
      
      This patch also includes a simple (100 LOC) bottom up SLP vectorizer that uses the infrastructure, and can vectorize this code:
      
      void SAXPY(int *x, int *y, int a, int i) {
        x[i]   = a * x[i]   + y[i];
        x[i+1] = a * x[i+1] + y[i+1];
        x[i+2] = a * x[i+2] + y[i+2];
        x[i+3] = a * x[i+3] + y[i+3];
      }
      
      llvm-svn: 179117
      2d9dec32
  11. Apr 05, 2013
  12. Mar 14, 2013
  13. Mar 10, 2013
  14. Mar 09, 2013
  15. Mar 08, 2013
  16. Mar 02, 2013
    • Nadav Rotem's avatar
      PR14448 - prevent the loop vectorizer from vectorizing the same loop twice. · 739e37a0
      Nadav Rotem authored
      The LoopVectorizer often runs multiple times on the same function due to inlining.
      When this happens the loop vectorizer often vectorizes the same loops multiple times, increasing code size and adding unneeded branches.
      With this patch, the vectorizer during vectorization puts metadata on scalar loops and marks them as 'already vectorized' so that it knows to ignore them when it sees them a second time.
      
      PR14448.
      
      llvm-svn: 176399
      739e37a0
  17. Mar 01, 2013
  18. Feb 27, 2013
  19. Feb 21, 2013
    • Renato Golin's avatar
      Allow GlobalValues to vectorize with AliasAnalysis · cf928cb5
      Renato Golin authored
      Storing the load/store instructions with the values
      and inspect them using Alias Analysis to make sure
      they don't alias, since the GEP pointer operand doesn't
      take the offset into account.
      
      Trying hard to not add any extra cost to loads and stores
      that don't overlap on global values, AA is *only* calculated
      if all of the previous attempts failed.
      
      Using biggest vector register size as the stride for the
      vectorization access, as we're being conservative and
      the cost model (which calculates the real vectorization
      factor) is only run after the legalization phase.
      
      We might re-think this relationship in the future, but
      for now, I'd rather be safe than sorry.
      
      llvm-svn: 175818
      cf928cb5
  20. Feb 17, 2013
    • Hal Finkel's avatar
      BBVectorize: Fix an invalid reference bug · 76e65e45
      Hal Finkel authored
      This fixes PR15289. This bug was introduced (recently) in r175215; collecting
      all std::vector references for candidate pairs to delete at once is invalid
      because subsequent lookups in the owning DenseMap could invalidate the
      references.
      
      bugpoint was able to reduce a useful test case. Unfortunately, because whether
      or not this asserts depends on memory layout, this test case will sometimes
      appear to produce valid output. Nevertheless, running under valgrind will
      reveal the error.
      
      llvm-svn: 175397
      76e65e45
  21. Feb 15, 2013
    • Hal Finkel's avatar
      BBVectorize: Call a DAG and DAG instead of a tree · 89909397
      Hal Finkel authored
      Several functions and variable names used the term 'tree' to refer
      to what is actually a DAG. Correcting this mistake will, hopefully,
      prevent confusion in the future.
      
      No functionality change intended.
      
      llvm-svn: 175278
      89909397
    • Hal Finkel's avatar
      BBVectorize: Cap the number of candidate pairs in each instruction group · 283f4f0e
      Hal Finkel authored
      For some basic blocks, it is possible to generate many candidate pairs for
      relatively few pairable instructions. When many (tens of thousands) of these pairs
      are generated for a single instruction group, the time taken to generate and
      rank the different vectorization plans can become quite large. As a result, we now
      cap the number of candidate pairs within each instruction group. This is done by
      closing out the group once the threshold is reached (set now at 3000 pairs).
      
      Although this will limit the overall compile-time impact, this may not be the best
      way to achieve this result. It might be better, for example, to prune excessive
      candidate pairs after the fact the prevent the generation of short, but highly-connected
      groups. We can experiment with this in the future.
      
      This change reduces the overall compile-time slowdown of the csa.ll test case in
      PR15222 to ~5x. If 5x is still considered too large, a lower limit can be
      used as the default.
      
      This represents a functionality change, but only for very large inputs
      (thus, there is no regression test).
      
      llvm-svn: 175251
      283f4f0e
  22. Feb 14, 2013
  23. Feb 13, 2013
  24. Feb 12, 2013
    • Hal Finkel's avatar
      BBVectorize: Don't over-search when building the dependency map · 6ae564b4
      Hal Finkel authored
      When building the pairable-instruction dependency map, don't search
      past the last pairable instruction. For large blocks that have been
      divided into multiple instruction groups, searching past the last
      instruction in each group is very wasteful. This gives a 32% speedup
      on the csa.ll test case from PR15222 (when using 50 instructions
      in each group).
      
      No functionality change intended.
      
      llvm-svn: 174915
      6ae564b4
    • Hal Finkel's avatar
      BBVectorize: Omit unnecessary entries in PairableInstUsers · 39a95032
      Hal Finkel authored
      This map is queried only for instructions in pairs of pairable
      instructions; so make sure that only pairs of pairable
      instructions are added to the map. This gives a 3.5% speedup
      on the csa.ll test case from PR15222.
      
      No functionality change intended.
      
      llvm-svn: 174914
      39a95032
  25. Feb 11, 2013
Loading