Skip to content
  1. Jul 21, 2014
    • Gerolf Hoflehner's avatar
      Fix for regression: [Bug 20369] wrong code at -O3 on x86_64-linux-gnu in 64-bit mode · ae1ec299
      Gerolf Hoflehner authored
      Prevents hoisting of loads above stores and sinking of stores below loads
      in MergedLoadStoreMotion.cpp (rdar://15991737)
      
      llvm-svn: 213497
      ae1ec299
    • Hal Finkel's avatar
      [LoopVectorize] Remove an unused private AA pointer · 07c9bb3d
      Hal Finkel authored
      Thanks to the lld-x86_64-darwin13 builder for catching this first.
      
      llvm-svn: 213488
      07c9bb3d
    • Hal Finkel's avatar
      [LoopVectorize] Use AA to partition potential dependency checks · 7ae00a12
      Hal Finkel authored
      Prior to this change, the loop vectorizer did not make use of the alias
      analysis infrastructure. Instead, it performed memory dependence analysis using
      ScalarEvolution-based linear dependence checks within equivalence classes
      derived from the results of ValueTracking's GetUnderlyingObjects.
      
      Unfortunately, this meant that:
        1. The loop vectorizer had logic that essentially duplicated that in BasicAA
           for aliasing based on identified objects.
        2. The loop vectorizer could not partition the space of dependency checks
           based on information only easily available from within AA (TBAA metadata is
           currently the prime example).
      
      This means, for example, regardless of whether -fno-strict-aliasing was
      provided, the vectorizer would only vectorize this loop with a runtime
      memory-overlap check:
      
      void foo(int *a, float *b) {
        for (int i = 0; i < 1600; ++i)
          a[i] = b[i];
      }
      
      This is suboptimal because the TBAA metadata already provides the information
      necessary to show that this check unnecessary. Of course, the vectorizer has a
      limit on the number of such checks it will insert, so in practice, ignoring
      TBAA means not vectorizing more-complicated loops that we should.
      
      This change causes the vectorizer to use an AliasSetTracker to keep track of
      the pointers in the loop. The resulting alias sets are then used to partition
      the space of dependency checks, and potential runtime checks; this results in
      more-efficient vectorizations.
      
      When pointer locations are added to the AliasSetTracker, two things are done:
        1. The location size is set to UnknownSize (otherwise you'd not catch
           inter-iteration dependencies)
        2. For instructions in blocks that would need to be predicated, TBAA is
           removed (because the metadata might have a control dependency on the condition
           being speculated).
      
      For non-predicated blocks, you can leave the TBAA metadata. This is safe
      because you can't have an iteration dependency on the TBAA metadata (if you
      did, and you unrolled sufficiently, you'd end up with the same pointer value
      used by two accesses that TBAA says should not alias, and that would yield
      undefined behavior).
      
      llvm-svn: 213486
      7ae00a12
  2. Jul 20, 2014
  3. Jul 19, 2014
  4. Jul 18, 2014
  5. Jul 17, 2014
  6. Jul 16, 2014
  7. Jul 15, 2014
  8. Jul 14, 2014
  9. Jul 13, 2014
  10. Jul 12, 2014
  11. Jul 11, 2014
  12. Jul 10, 2014
    • Duncan P. N. Exon Smith's avatar
      InstCombine: Fix a crash in Descale for multiply-by-zero · 04934b0f
      Duncan P. N. Exon Smith authored
      Fix a crash in `InstCombiner::Descale()` when a multiply-by-zero gets
      created as an argument to a GEP partway through an iteration, causing
      -instcombine to optimize the GEP before the multiply.
      
      rdar://problem/17615671
      
      llvm-svn: 212742
      04934b0f
    • Hal Finkel's avatar
      Feeding isSafeToSpeculativelyExecute its DataLayout pointer (in Sink) · 511fea7a
      Hal Finkel authored
      This is the one remaining place I see where passing
      isSafeToSpeculativelyExecute a DataLayout pointer might matter (at least for
      loads) -- I think I got the others in r212720. Most of the other remaining
      callers of isSafeToSpeculativelyExecute only use it for call sites (or
      otherwise exclude loads).
      
      llvm-svn: 212730
      511fea7a
    • Hal Finkel's avatar
      Feeding isSafeToSpeculativelyExecute its DataLayout pointer · a995f926
      Hal Finkel authored
      isSafeToSpeculativelyExecute can optionally take a DataLayout pointer. In the
      past, this was mainly used to make better decisions regarding divisions known
      not to trap, and so was not all that important for users concerned with "cheap"
      instructions. However, now it also helps look through bitcasts for
      dereferencable loads, and will also be important if/when we add a
      dereferencable pointer attribute.
      
      This is some initial work to feed a DataLayout pointer through to callers of
      isSafeToSpeculativelyExecute, generally where one was already available.
      
      llvm-svn: 212720
      a995f926
    • Hal Finkel's avatar
      Allow isDereferenceablePointer to look through some bitcasts · 2e42c34d
      Hal Finkel authored
      isDereferenceablePointer should not give up upon encountering any bitcast. If
      we're casting from a pointer to a larger type to a pointer to a small type, we
      can continue by examining the bitcast's operand. This missing capability
      was noted in a comment in the function.
      
      In order for this to work, isDereferenceablePointer now takes an optional
      DataLayout pointer (essentially all callers already had such a pointer
      available). Most code uses isDereferenceablePointer though
      isSafeToSpeculativelyExecute (which already took an optional DataLayout
      pointer), and to enable the LICM test case, LICM needs to actually provide its DL
      pointer to isSafeToSpeculativelyExecute (which it was not doing previously).
      
      llvm-svn: 212686
      2e42c34d
    • Peter Collingbourne's avatar
      [dfsan] Handle bitcast aliases. · 2e28edf8
      Peter Collingbourne authored
      llvm-svn: 212668
      2e28edf8
  13. Jul 09, 2014
Loading