Skip to content
  1. Apr 30, 2012
  2. Apr 27, 2012
  3. Apr 26, 2012
    • Chandler Carruth's avatar
      Teach the reassociate pass to fold chains of multiplies with repeated · 739ef80f
      Chandler Carruth authored
      elements to minimize the number of multiplies required to compute the
      final result. This uses a heuristic to attempt to form near-optimal
      binary exponentiation-style multiply chains. While there are some cases
      it misses, it seems to at least a decent job on a very diverse range of
      inputs.
      
      Initial benchmarks show no interesting regressions, and an 8%
      improvement on SPASS. Let me know if any other interesting results (in
      either direction) crop up!
      
      Credit to Richard Smith for the core algorithm, and helping code the
      patch itself.
      
      llvm-svn: 155616
      739ef80f
  4. Apr 25, 2012
  5. Apr 24, 2012
  6. Apr 23, 2012
    • Jakob Stoklund Olesen's avatar
      Reapply r155136 after fixing PR12599. · 43bcb970
      Jakob Stoklund Olesen authored
      Original commit message:
      
      Defer some shl transforms to DAGCombine.
      
      The shl instruction is used to represent multiplication by a constant
      power of two as well as bitwise left shifts. Some InstCombine
      transformations would turn an shl instruction into a bit mask operation,
      making it difficult for later analysis passes to recognize the
      constsnt multiplication.
      
      Disable those shl transformations, deferring them to DAGCombine time.
      An 'shl X, C' instruction is now treated mostly the same was as 'mul X, C'.
      
      These transformations are deferred:
      
        (X >>? C) << C   --> X & (-1 << C)  (When X >> C has multiple uses)
        (X >>? C1) << C2 --> X << (C2-C1) & (-1 << C2)   (When C2 > C1)
        (X >>? C1) << C2 --> X >>? (C1-C2) & (-1 << C2)  (When C1 > C2)
      
      The corresponding exact transformations are preserved, just like
      div-exact + mul:
      
        (X >>?,exact C) << C   --> X
        (X >>?,exact C1) << C2 --> X << (C2-C1)
        (X >>?,exact C1) << C2 --> X >>?,exact (C1-C2)
      
      The disabled transformations could also prevent the instruction selector
      from recognizing rotate patterns in hash functions and cryptographic
      primitives. I have a test case for that, but it is too fragile.
      
      llvm-svn: 155362
      43bcb970
    • Alexander Potapenko's avatar
      Fix issue 67 by checking that the interface functions weren't redefined in the... · 056e27ea
      Alexander Potapenko authored
      Fix issue 67 by checking that the interface functions weren't redefined in the compiled source file.
      
      llvm-svn: 155346
      056e27ea
    • Kostya Serebryany's avatar
      [tsan] use llvm/ADT/Statistic.h for tsan stats · 5a4b7a23
      Kostya Serebryany authored
      llvm-svn: 155341
      5a4b7a23
  7. Apr 20, 2012
  8. Apr 19, 2012
    • Dan Gohman's avatar
      Avoid a bug in the path count computation, preventing an infinite · 26aa8274
      Dan Gohman authored
      loop repeatedlt making the same change. This is for rdar://11256239.
      
      llvm-svn: 155160
      26aa8274
    • Jakob Stoklund Olesen's avatar
      Defer some shl transforms to DAGCombine. · 6b6c81e6
      Jakob Stoklund Olesen authored
      The shl instruction is used to represent multiplication by a constant
      power of two as well as bitwise left shifts. Some InstCombine
      transformations would turn an shl instruction into a bit mask operation,
      making it difficult for later analysis passes to recognize the
      constsnt multiplication.
      
      Disable those shl transformations, deferring them to DAGCombine time.
      An 'shl X, C' instruction is now treated mostly the same was as 'mul X, C'.
      
      These transformations are deferred:
      
        (X >>? C) << C   --> X & (-1 << C)  (When X >> C has multiple uses)
        (X >>? C1) << C2 --> X << (C2-C1) & (-1 << C2)   (When C2 > C1)
        (X >>? C1) << C2 --> X >>? (C1-C2) & (-1 << C2)  (When C1 > C2)
      
      The corresponding exact transformations are preserved, just like
      div-exact + mul:
      
        (X >>?,exact C) << C   --> X
        (X >>?,exact C1) << C2 --> X << (C2-C1)
        (X >>?,exact C1) << C2 --> X >>?,exact (C1-C2)
      
      The disabled transformations could also prevent the instruction selector
      from recognizing rotate patterns in hash functions and cryptographic
      primitives. I have a test case for that, but it is too fragile.
      
      llvm-svn: 155136
      6b6c81e6
    • Dan Gohman's avatar
      Don't crash on code where the user put __attribute__((constructor)) on · 22fbe8d7
      Dan Gohman authored
      a function with arguments. This fixes rdar://11265785.
      
      llvm-svn: 155073
      22fbe8d7
  9. Apr 18, 2012
    • Bill Wendling's avatar
      Use a heavy hammer to fix PR12573. · 4d4d0257
      Bill Wendling authored
      If the loop contains invoke instructions, whose unwind edge escapes the loop,
      then don't try to unswitch the loop. Doing so may cause the unwind edge to be
      split, which not only is non-trivial but doesn't preserve loop simplify
      information.
      
      Fixes PR12573
      
      llvm-svn: 154987
      4d4d0257
    • Andrew Trick's avatar
      loop-reduce: Add an early bailout to catch extremely large loops. · 19f80c1e
      Andrew Trick authored
      This introduces a threshold of 200 IV Users, which is very
      conservative but should be sufficient to avoid serious compile time
      sink or stack overflow. The llvm test-suite with LTO never exceeds 190
      users per loop.
      
      The bug doesn't relate to a specific type of loop. Checking in an
      arbitrary giant loop as a unit test would be silly.
      
      Fixes rdar://11262507.
      
      llvm-svn: 154983
      19f80c1e
    • Joe Groff's avatar
      fix pr12559: mark unavailable win32 math libcalls · a81bcbb9
      Joe Groff authored
      also fix SimplifyLibCalls to use TLI rather than compile-time conditionals to enable optimizations on floor, ceil, round, rint, and nearbyint
      
      llvm-svn: 154960
      a81bcbb9
  10. Apr 16, 2012
  11. Apr 14, 2012
  12. Apr 13, 2012
Loading