Skip to content
  1. Jan 20, 2012
    • Kostya Serebryany's avatar
      Extend Attributes to 64 bits · a5054ad2
      Kostya Serebryany authored
      Problem: LLVM needs more function attributes than currently available (32 bits).
      One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc).
      
      Solution:
      - extend the Attributes from 32 bits to 64-bits
      - wrap the object into a class so that unsigned is never erroneously used instead
      - change "unsigned" to "Attributes" throughout the code, including one place in clang.
      - the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking.
      - the class has "safe operator bool()" to support the common idiom:  if (Attributes attr = getAttrs()) useAttrs(attr);
      - The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls
      - Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work.
      - Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit.
      
      Tested:
      "make check" on Linux (32-bit and 64-bit) and Mac (10.6)
      built/run spec CPU 2006 on Linux with clang -O2.
      
      
      This change will break clang build in lib/CodeGen/CGCall.cpp.
      The following patch will fix it.
      
      llvm-svn: 148553
      a5054ad2
    • Benjamin Kramer's avatar
      Add missing breaks to switch. · d3309a34
      Benjamin Kramer authored
      Found by the clang static analyzer.
      
      llvm-svn: 148543
      d3309a34
    • Benjamin Kramer's avatar
      Remove a bunch of unused variable assignments. · 084b9f41
      Benjamin Kramer authored
      Found by the clang static analyzer.
      
      llvm-svn: 148541
      084b9f41
    • Benjamin Kramer's avatar
      Remove obviously invalid early exit that prevented analyzing ConstantAggregateZeros. · fe4848b5
      Benjamin Kramer authored
      Found by the clang static analyzer.
      
      llvm-svn: 148540
      fe4848b5
    • Craig Topper's avatar
      Improve 256-bit shuffle splitting to allow 2 sources in each 128-bit lane. As... · a4094790
      Craig Topper authored
      Improve 256-bit shuffle splitting to allow 2 sources in each 128-bit lane. As long as only a single lane of the source is used in the lane in the destination. This makes the splitting match much closer to what happens with 256-bit shuffles when AVX is disabled and only 128-bit XMM is allowed.
      
      llvm-svn: 148537
      a4094790
    • Nick Lewycky's avatar
      Fix CountCodeReductionForAlloca to more accurately represent what SROA can and · e8415fea
      Nick Lewycky authored
      can't handle. Also don't produce non-zero results for things which won't be
      transformed by SROA at all just because we saw the loads/stores before we saw
      the use of the address.
      
      llvm-svn: 148536
      e8415fea
    • Andrew Trick's avatar
      SCEVExpander fixes. Affects LSR and indvars. · c908b43d
      Andrew Trick authored
      LSR has gradually been improved to more aggressively reuse existing code, particularly existing phi cycles. This exposed problems with the SCEVExpander's sloppy treatment of its insertion point. I applied some rigor to the insertion point problem that will hopefully avoid an endless bug cycle in this area. Changes:
      
      - Always used properlyDominates to check safe code hoisting.
      
      - The insertion point provided to SCEV is now considered a lower bound. This is usually a block terminator or the use itself. Under no cirumstance may SCEVExpander insert below this point.
      
      - LSR is reponsible for finding a "canonical" insertion point across expansion of different expressions.
      
      - Robust logic to determine whether IV increments are in "expanded" form and/or can be safely hoisted above some insertion point.
      
      Fixes PR11783: SCEVExpander assert.
      
      llvm-svn: 148535
      c908b43d
    • Craig Topper's avatar
      Add support for selecting 256-bit PALIGNR. · 3469212c
      Craig Topper authored
      llvm-svn: 148532
      3469212c
    • Bill Wendling's avatar
      When lowering the 'resume' instruction, look to see if we can eliminate the · 92492618
      Bill Wendling authored
      'insertvalue' instructions that recreate the structure returned by the
      'landingpad' instruction. Because the 'insertvalue' instruction isn't supported
      by FastISel, this can save a bit of time during -O0 compilation.
      
      llvm-svn: 148520
      92492618
    • Eli Friedman's avatar
      Support MSVC x86-32 sret convention. PR11688. Patch by Joe Groff. · 32c7c25d
      Eli Friedman authored
      llvm-svn: 148513
      32c7c25d
  2. Jan 19, 2012
  3. Jan 18, 2012
Loading