Skip to content
  1. Nov 17, 2013
    • Hal Finkel's avatar
      Fix ndebug-build unused variable in loop rerolling · 67107ea1
      Hal Finkel authored
      llvm-svn: 194941
      67107ea1
    • Matt Arsenault's avatar
      Use right address space pointer size · 36f5eb59
      Matt Arsenault authored
      llvm-svn: 194940
      36f5eb59
    • Hal Finkel's avatar
      Add a loop rerolling pass · bf45efde
      Hal Finkel authored
      This adds a loop rerolling pass: the opposite of (partial) loop unrolling. The
      transformation aims to take loops like this:
      
      for (int i = 0; i < 3200; i += 5) {
        a[i]     += alpha * b[i];
        a[i + 1] += alpha * b[i + 1];
        a[i + 2] += alpha * b[i + 2];
        a[i + 3] += alpha * b[i + 3];
        a[i + 4] += alpha * b[i + 4];
      }
      
      and turn them into this:
      
      for (int i = 0; i < 3200; ++i) {
        a[i] += alpha * b[i];
      }
      
      and loops like this:
      
      for (int i = 0; i < 500; ++i) {
        x[3*i] = foo(0);
        x[3*i+1] = foo(0);
        x[3*i+2] = foo(0);
      }
      
      and turn them into this:
      
      for (int i = 0; i < 1500; ++i) {
        x[i] = foo(0);
      }
      
      There are two motivations for this transformation:
      
        1. Code-size reduction (especially relevant, obviously, when compiling for
      code size).
      
        2. Providing greater choice to the loop vectorizer (and generic unroller) to
      choose the unrolling factor (and a better ability to vectorize). The loop
      vectorizer can take vector lengths and register pressure into account when
      choosing an unrolling factor, for example, and a pre-unrolled loop limits that
      choice. This is especially problematic if the manual unrolling was optimized
      for a machine different from the current target.
      
      The current implementation is limited to single basic-block loops only. The
      rerolling recognition should work regardless of how the loop iterations are
      intermixed within the loop body (subject to dependency and side-effect
      constraints), but the significant restriction is that the order of the
      instructions in each iteration must be identical. This seems sufficient to
      capture all current use cases.
      
      This pass is not currently enabled by default at any optimization level.
      
      llvm-svn: 194939
      bf45efde
    • Fariborz Jahanian's avatar
      ObjectiveC ARC. More validation of toll-free bridging of · 2c312128
      Fariborz Jahanian authored
      CF objects with objc_bridge'ing annotaiton.
      // rdar://15454846
      
      llvm-svn: 194938
      2c312128
  2. Nov 16, 2013
Loading