Skip to content
  1. Apr 29, 2018
  2. Apr 28, 2018
  3. Apr 27, 2018
    • Reid Kleckner's avatar
      [FastISel] Actually enable local value sinking by default · efc0f8cb
      Reid Kleckner authored
      llvm-svn: 331088
      efc0f8cb
    • Reid Kleckner's avatar
      [FastISel] Fix local value sinking algorithmic complexity · a28e767f
      Reid Kleckner authored
      Now local value sinking only scans and numbers instructions added
      between the current flush point and the last flush point. This ensures
      that ISel is overall linear in the size of the BB.
      
      Fixes PR37010 and re-enables local value sinking by default.
      
      llvm-svn: 331087
      a28e767f
    • Adrian Prantl's avatar
      Fix a bug in GlobalOpt's handling of DIExpressions. · 210a29de
      Adrian Prantl authored
      This patch adds support for fragment expressions
      TryToShrinkGlobalToBoolean() which were previously just dropped.
      
      Thanks to Reid Kleckner for providing me a reproducer!
      
      llvm-svn: 331086
      210a29de
    • Roman Lebedev's avatar
      [PatternMatch] Stabilize the matching order of commutative matchers · 6959b8e7
      Roman Lebedev authored
      Summary:
      Currently, we
      1. match `LHS` matcher to the `first` operand of binary operator,
      2. and then match `RHS` matcher to the `second` operand of binary operator.
      If that does not match, we swap the `LHS` and `RHS` matchers:
      1. match `RHS` matcher to the `first` operand of binary operator,
      2. and then match `LHS` matcher to the `second` operand of binary operator.
      
      This works ok.
      But it complicates writing of commutative matchers, where one would like to match
      (`m_Value()`) the value on one side, and use (`m_Specific()`) it on the other side.
      
      This is additionally complicated by the fact that `m_Specific()` stores the `Value *`,
      not `Value **`, so it won't work at all out of the box.
      
      The last problem is trivially solved by adding a new `m_c_Specific()` that stores the
      `Value **`, not `Value *`. I'm choosing to add a new matcher, not change the existing
      one because i guess all the current users are ok with existing behavior,
      and this additional pointer indirection may have performance drawbacks.
      Also, i'm storing pointer, not reference, because for some mysterious-to-me reason
      it did not work with the reference.
      
      The first one appears trivial, too.
      Currently, we
      1. match `LHS` matcher to the `first` operand of binary operator,
      2. and then match `RHS` matcher to the `second` operand of binary operator.
      If that does not match, we swap the ~~`LHS` and `RHS` matchers~~ **operands**:
      1. match ~~`RHS`~~ **`LHS`** matcher to the ~~`first`~~ **`second`** operand of binary operator,
      2. and then match ~~`LHS`~~ **`RHS`** matcher to the ~~`second`~ **`first`** operand of binary operator.
      
      Surprisingly, `$ ninja check-llvm` still passes with this.
      But i expect the bots will disagree..
      
      The motivational unittest is included.
      I'd like to use this in D45664.
      
      Reviewers: spatel, craig.topper, arsenm, RKSimon
      
      Reviewed By: craig.topper
      
      Subscribers: xbolva00, wdng, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D45828
      
      llvm-svn: 331085
      6959b8e7
    • Simon Pilgrim's avatar
      [X86] Merge some x87 instruction instregex single matches. NFCI. · 8ee7d01d
      Simon Pilgrim authored
      llvm-svn: 331084
      8ee7d01d
    • Sanjay Patel's avatar
      [Reassociate] add a test with debug info; NFC · 2677038c
      Sanjay Patel authored
      As suggested in D45842 
      (although still not sure if we're going to advance that),
      we must invalidate references to instructions that have
      been recycled (operands were changed, so result is different).
      
      llvm-svn: 331083
      2677038c
    • Daniel Sanders's avatar
      Attempt to fix remaining build failures after r331071 by changing the tuple to a struct · 4f246999
      Daniel Sanders authored
      Some of the bots were failing in a different way to the others. These were
      unable to compare tuples. Fix this by changing to a struct, thereby avoiding
      the quirks of tuples.
      
      llvm-svn: 331081
      4f246999
    • Philip Reames's avatar
      [LICM] Reduce nesting with an early return [NFC] · 5a648245
      Philip Reames authored
      llvm-svn: 331080
      5a648245
    • Philip Reames's avatar
      [MustExecute/LICM] Special case first instruction in throwing header · e4ec473b
      Philip Reames authored
      We currently have a hard to solve analysis problem around the order of instructions within a potentially throwing block.  We can't cheaply determine whether a given instruction is before the first potential throw in the block.  While we're working on that in the background, special case the first instruction within the header.
      
      why this particular special case?  Well, headers are guaranteed to execute if the loop does, and it turns out we tend to produce this form in practice.
      
      In a follow on patch, I tend to extend LICM with an alternate approach which works for any instruction in the header before the first throw, but this is the best I can come up with other users of the analysis (such as store promotion.)
      
      Note: I can't show the difference in the analysis result since we're ORing in the expensive instruction walk used by SCEV.  Using the full walk is not suitable for a general solution.
      llvm-svn: 331079
      e4ec473b
    • Vlad Tsyrklevich's avatar
      ELFObjectWriter: Allow one unique symver per symbol · 201a1086
      Vlad Tsyrklevich authored
      Summary:
      Only allow a single unique .symver alias per symbol. This matches the
      behavior of gas. I noticed that we ignored multiple mismatched symver
      directives looking at https://reviews.llvm.org/D45798
      
      Reviewers: pcc, tejohnson, espindola
      
      Reviewed By: pcc
      
      Subscribers: emaste, arichardson, llvm-commits, kcc
      
      Differential Revision: https://reviews.llvm.org/D45845
      
      llvm-svn: 331078
      201a1086
    • Daniel Neilson's avatar
      [LV] Common duplicate vector load/store address calculation (NFC) · a19ee7d7
      Daniel Neilson authored
      Summary:
      Commoning some obviously copy/paste code in
      InnerLoopVectorizer::vectorizeMemoryInstruction
      
      llvm-svn: 331076
      a19ee7d7
    • Daniel Sanders's avatar
      Attempt to fix build failure after r331071 using std::make_tuple · a05e8d3e
      Daniel Sanders authored
      llvm-svn: 331074
      a05e8d3e
    • Jun Bum Lim's avatar
      [PostRASink] extend the live-in check for all aliased registers · 9e3e14b5
      Jun Bum Lim authored
      Extend the live-in check for all aliased registers so that we can
      allow sinking Copy instructions when only implicit def is in successor's
      live-in.
      
      llvm-svn: 331072
      9e3e14b5
Loading