Skip to content
  1. Feb 28, 2014
    • Tobias Grosser's avatar
      Add 'remark' diagnostic type in LLVM · e8d4c9a2
      Tobias Grosser authored
      A 'remark' is information that is not an error or a warning, but rather some
      additional information provided to the user. In contrast to a 'note' a 'remark'
      is an independent diagnostic, whereas a 'note' always depends on another
      diagnostic.
      
      A typical use case for remark nodes is information provided to the user, e.g.
      information provided by the vectorizer about loops that have been vectorized.
      
      llvm-svn: 202474
      e8d4c9a2
    • Hal Finkel's avatar
      Swap PPC isel operands to allow for 0-folding · b998915e
      Hal Finkel authored
      The PPC isel instruction can fold 0 into the first operand (thus eliminating
      the need to materialize a zero-containing register when the 'true' result of
      the isel is 0). When the isel is fed by a bit register operation that we can
      invert, do so as part of the bit-register-operation peephole routine.
      
      llvm-svn: 202469
      b998915e
    • Rafael Espindola's avatar
      Now that it is possible, use the mangler in IRObjectFile. · a51f0f83
      Rafael Espindola authored
      A really simple patch marks the end of a lot of yak shaving :-)
      
      llvm-svn: 202463
      a51f0f83
    • Hal Finkel's avatar
      Trying to unbreak the darwin11 builder · 5cae2168
      Hal Finkel authored
      The CR bit tracking code broke PPC/Darwin; trying to get it working again...
      
      (the darwin11 builder, which defaults to the darwin ABI when running PPC tests,
      asserted when running test/CodeGen/PowerPC/inverted-bool-compares.ll)
      
      llvm-svn: 202459
      5cae2168
    • Hal Finkel's avatar
      Try to unbreak the C++11 build · b39a0475
      Hal Finkel authored
      Cannot use negative numbers in case statements without running afoul of -Wc++11-narrowing.
      
      llvm-svn: 202455
      b39a0475
    • Hal Finkel's avatar
      Add CR-bit tracking to the PowerPC backend for i1 values · 940ab934
      Hal Finkel authored
      This change enables tracking i1 values in the PowerPC backend using the
      condition register bits. These bits can be treated on PowerPC as separate
      registers; individual bit operations (and, or, xor, etc.) are supported.
      Tracking booleans in CR bits has several advantages:
      
       - Reduction in register pressure (because we no longer need GPRs to store
         boolean values).
      
       - Logical operations on booleans can be handled more efficiently; we used to
         have to move all results from comparisons into GPRs, perform promoted
         logical operations in GPRs, and then move the result back into condition
         register bits to be used by conditional branches. This can be very
         inefficient, because the throughput of these CR <-> GPR moves have high
         latency and low throughput (especially when other associated instructions
         are accounted for).
      
       - On the POWER7 and similar cores, we can increase total throughput by using
         the CR bits. CR bit operations have a dedicated functional unit.
      
      Most of this is more-or-less mechanical: Adjustments were needed in the
      calling-convention code, support was added for spilling/restoring individual
      condition-register bits, and conditional branch instruction definitions taking
      specific CR bits were added (plus patterns and code for generating bit-level
      operations).
      
      This is enabled by default when running at -O2 and higher. For -O0 and -O1,
      where the ability to debug is more important, this feature is disabled by
      default. Individual CR bits do not have assigned DWARF register numbers,
      and storing values in CR bits makes them invisible to the debugger.
      
      It is critical, however, that we don't move i1 values that have been promoted
      to larger values (such as those passed as function arguments) into bit
      registers only to quickly turn around and move the values back into GPRs (such
      as happens when values are returned by functions). A pair of target-specific
      DAG combines are added to remove the trunc/extends in:
        trunc(binary-ops(binary-ops(zext(x), zext(y)), ...)
      and:
        zext(binary-ops(binary-ops(trunc(x), trunc(y)), ...)
      In short, we only want to use CR bits where some of the i1 values come from
      comparisons or are used by conditional branches or selects. To put it another
      way, if we can do the entire i1 computation in GPRs, then we probably should
      (on the POWER7, the GPR-operation throughput is higher, and for all cores, the
      CR <-> GPR moves are expensive).
      
      POWER7 test-suite performance results (from 10 runs in each configuration):
      
      SingleSource/Benchmarks/Misc/mandel-2: 35% speedup
      MultiSource/Benchmarks/Prolangs-C++/city/city: 21% speedup
      MultiSource/Benchmarks/MiBench/automotive-susan: 23% speedup
      SingleSource/Benchmarks/CoyoteBench/huffbench: 13% speedup
      SingleSource/Benchmarks/Misc-C++/Large/sphereflake: 13% speedup
      SingleSource/Benchmarks/Misc-C++/mandel-text: 10% speedup
      
      SingleSource/Benchmarks/Misc-C++-EH/spirit: 10% slowdown
      MultiSource/Applications/lemon/lemon: 8% slowdown
      
      llvm-svn: 202451
      940ab934
    • Hal Finkel's avatar
      Fix visitTRUNCATE for legal i1 values · ab51ecd4
      Hal Finkel authored
      This extract-and-trunc vector optimization cannot work for i1 values as
      currently implemented, and so I'm disabling this for now for i1 values. In the
      future, this can be fixed properly.
      
      Soon I'll commit support for i1 CR bit tracking in the PowerPC backend, and
      this will be covered by one of the existing regression tests.
      
      llvm-svn: 202449
      ab51ecd4
  2. Feb 27, 2014
  3. Feb 26, 2014
    • Andrew Trick's avatar
      Add a limit to the heuristic that register allocates instructions in local order. · 52a00936
      Andrew Trick authored
      This handles pathological cases in which we see 2x increase in spill
      code for large blocks (~50k instructions). I don't have a unit test
      for this behavior.
      
      Fixes rdar://16072279.
      
      llvm-svn: 202304
      52a00936
    • Quentin Colombet's avatar
      Lower unsigned vsetcc to psubus in certain cases · 85c9e162
      Quentin Colombet authored
      The current approach to lower a vsetult is to flip the sign bit of the
      operands, swap the operands and then use a (signed) pcmpgt.  psubus (unsigned
      saturating subtract) can be used to emulate a vsetult more efficiently:
      
      +    case ISD::SETULT: {
      +      // If the comparison is against a constant we can turn this into a
      +      // setule.  With psubus, setule does not require a swap.  This is
      +      // beneficial because the constant in the register is no longer
      +      // destructed as the destination so it can be hoisted out of a loop.
      
      I also enable lowering via psubus in a few other cases where it's clearly
      beneficial: setule and setuge if minu/maxu cannot be used.
          
      rdar://problem/14338765
      
      Patch by Adam Nemet <anemet@apple.com>.
      
      llvm-svn: 202301
      85c9e162
Loading