1. Feb 01, 2018
  2. Jan 31, 2018
    • Petar Jovanovic's avatar
      [DWARF] Allow duplication of tails with CFI instructions · 540f4cd1
      Petar Jovanovic authored
      This commit came as a result for revert of patch r317579 (originally
      committed as r317100). The patch made CFI instructions duplicable, because
      their existence in the epilogue block was affecting the Tail duplication
      pass. However, duplicating blocks with CFI instructions was an issue for
      compact unwind info on Darwin, which is why the patch was reverted.
      
      This patch allows duplicating tails with CFI instructions, though they are
      not duplicable, by copying them 'manually'.
      
      
      Patch by Djordje Kovacevic.
      
      Differential Revision: https://reviews.llvm.org/D40979
      
      llvm-svn: 323883
      540f4cd1
    • Sanjay Patel's avatar
      [InstCombine] move related tests into the same file; NFC · fd58ade8
      Sanjay Patel authored
      llvm-svn: 323882
      fd58ade8
    • Sanjay Patel's avatar
      [InstCombine] add tests to show limit of canEvaluate* ; NFC · 8c74a9a1
      Sanjay Patel authored
      llvm-svn: 323881
      8c74a9a1
    • Nirav Dave's avatar
      [DAG] Prevent NodeId pruning of TokenFactors in Instruction Selection. · c3a1e16d
      Nirav Dave authored
      Summary:
      Instruction Selection preserves relative orders of all nodes save
      TokenFactors which we treat specially. As a result Node Ids for
      TokenFactors may violate the topological ordering and should not be
      considered as valid pruning candidates in predecessor search.
      
      Fixes PR35316.
      
      Reviewers: RKSimon, hfinkel
      
      Subscribers: hiraditya, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D42701
      
      llvm-svn: 323880
      c3a1e16d
    • Davide Italiano's avatar
      [lldb] Enable debugging of binaries with mixed (splitted/regular) dwarf · 98f0021d
      Davide Italiano authored
      This recommits the patch, now that I verified that the bot instability
      is due to something else. Sorry for the noise.
      
      llvm-svn: 323879
      98f0021d
    • Diana Picus's avatar
      Fix formatting for r323876. NFC · 12ed95e3
      Diana Picus authored
      llvm-svn: 323878
      12ed95e3
    • Sanjay Patel's avatar
      [InstCombine] reduce code duplication for canEvaluate* functions; NFCI · 1b66deea
      Sanjay Patel authored
      We'd have to make the change suggested in D42536 3x otherwise. 
      
      llvm-svn: 323877
      1b66deea
    • Diana Picus's avatar
      [ARM GlobalISel] Modernize LegalizerInfo. NFCI · 1d4421f6
      Diana Picus authored
      Start using the new LegalizerInfo API introduced in r323681.
      
      Keep the old API for opcodes that need Lowering in some circumstances
      (G_FNEG and G_UREM/G_SREM).
      
      llvm-svn: 323876
      1d4421f6
    • Marina Yatsina's avatar
      Fix build error in r323870 · 3f34f331
      Marina Yatsina authored
      Change-Id: I15a8b27764a4d817cfbe48836bf09dc6520934b7
      llvm-svn: 323874
      3f34f331
    • Florian Hahn's avatar
      [MachineCombiner] Add check for optimal pattern order. · c68428b5
      Florian Hahn authored
      In D41587, @mssimpso discovered that the order of some patterns for
      AArch64 was sub-optimal. I thought a bit about how we could avoid that
      case in the future. I do not think there is a need for evaluating all
      patterns for now. But this patch adds an extra (expensive) check, that
      evaluates the latencies of all patterns, and ensures that the latency
      saved decreases for subsequent patterns.
      
      This catches the sub-optimal order fixed in D41587, but I am not
      entirely happy with the check, as it only applies to sub-optimal
      patterns seen while building with EXPENSIVE_CHECKS on. It did not
      discover any other sub-optimal pattern ordering.
      
      Reviewers: Gerolf, spatel, mssimpso
      
      Reviewed By: Gerolf, mssimpso
      
      Differential Revision: https://reviews.llvm.org/D41766
      
      llvm-svn: 323873
      c68428b5
    • Sam McCall's avatar
      [clangd] Pass Context implicitly using TLS. · d1a7a37c
      Sam McCall authored
      Summary:
      Instead of passing Context explicitly around, we now have a thread-local
      Context object `Context::current()` which is an implicit argument to
      every function.
      Most manipulation of this should use the WithContextValue helper, which
      augments the current Context to add a single KV pair, and restores the
      old context on destruction.
      
      Advantages are:
      - less boilerplate in functions that just propagate contexts
      - reading most code doesn't require understanding context at all, and
        using context as values in fewer places still
      - fewer options to pass the "wrong" context when it changes within a
        scope (e.g. when using Span)
      - contexts pass through interfaces we can't modify, such as VFS
      - propagating contexts across threads was slightly tricky (e.g.
        copy vs move, no move-init in lambdas), and is now encapsulated in
        the threadpool
      
      Disadvantages are all the usual TLS stuff - hidden magic, and
      potential for higher memory usage on threads that don't use the
      context. (In practice, it's just one pointer)
      
      Reviewers: ilya-biryukov
      
      Subscribers: klimek, jkorous-apple, ioeric, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D42517
      
      llvm-svn: 323872
      d1a7a37c
    • Alexander Kornienko's avatar
      Update header guard. · dd48c6b5
      Alexander Kornienko authored
      llvm-svn: 323871
      dd48c6b5
    • Marina Yatsina's avatar
      Take into account the cost of local intervals when selecting split candidate. · cd5bc4a2
      Marina Yatsina authored
      When selecting a split candidate for region splitting, the register allocator tries to predict which candidate will have the cheapest spill cost.
      Global splitting may cause the creation of local intervals, and they might spill.
      
      This patch makes RA take into account the spill cost of local split intervals in use blocks (we already take into account the spill cost in through blocks).
      A flag ("-condsider-local-interval-cost") controls weather we do this advanced cost calculation (it's on by default for X86 target, off for the rest).
      
      Differential Revision: https://reviews.llvm.org/D41585
      
      Change-Id: Icccb8ad2dbf13124f5d97a18c67d95aa6be0d14d
      llvm-svn: 323870
      cd5bc4a2
    • Pablo Barrio's avatar
      [ARM] Lower lower saturate to 0 and lower saturate to -1 using bit-operations · 2e442a78
      Pablo Barrio authored
      Summary:
      Expressions of the form x < 0 ? 0 :  x; and x < -1 ? -1 : x can be lowered using bit-operations instead of branching or conditional moves
      
      In thumb-mode this results in a two-instruction sequence, a shift followed by a bic or or while in ARM/thumb2 mode that has flexible second operand the shift can be folded into a single bic/or instructions. In most cases this results in smaller code and possibly less branches, and in no case larger than before.
      
      Patch by Marten Svanfeldt.
      
      Reviewers: fhahn, pbarrio
      
      Reviewed By: pbarrio
      
      Subscribers: efriedma, rogfer01, aemerson, javed.absar, kristof.beyls, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D42574
      
      llvm-svn: 323869
      2e442a78
    • Amaury Sechet's avatar
      Add a regression test for problems caused by D42646 . NFC · 99dbec52
      Amaury Sechet authored
      llvm-svn: 323868
      99dbec52
    • Haojian Wu's avatar
      [clangd] Better handling symbols defined in macros. · b0189060
      Haojian Wu authored
      Summary:
      For symbols defined inside macros:
       * use expansion location, if the symbol is formed via macro concatenation.
       * use spelling location, otherwise.
      
      This will fix some symbols that have ill-format location (especial invalid filepath).
      
      Reviewers: ioeric
      
      Reviewed By: ioeric
      
      Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D42575
      
      llvm-svn: 323867
      b0189060
    • Jonas Paulsson's avatar
      [SystemZ] Check the bitwidth before calling isInt/isUInt. · cc5fe736
      Jonas Paulsson authored
      Since these methods will assert if the integer does not fit into 64 bits,
      it is necessary to do this check before calling them in
      supportedAddressingMode().
      
      Review: Ulrich Weigand.
      llvm-svn: 323866
      cc5fe736