1. Apr 19, 2019
    • Roland Froese's avatar
      [PowerPC] Add some PPC vec cost tests to prep for D60160 NFC · a5dd08ca
      Roland Froese authored
      llvm-svn: 358699
      a5dd08ca
    • Billy Robert O'Neal III's avatar
      [libc++] [test] Add missing required headers to midpoint.integer.pass.cpp · bd7db5ac
      Billy Robert O'Neal III authored
      This change authored by Paolo Torres <t-pator@microsoft.com>
      
      llvm-svn: 358698
      bd7db5ac
    • Yitzhak Mandelbaum's avatar
      [LibTooling] Extend Transformer to support multiple simultaneous changes. · fa1552e8
      Yitzhak Mandelbaum authored
      Summary: This revision allows users to specify independent changes to multiple (related) sections of the input.  Previously, only a single section of input could be selected for replacement.
      
      Reviewers: ilya-biryukov
      
      Reviewed By: ilya-biryukov
      
      Subscribers: jfb, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D60408
      
      llvm-svn: 358697
      fa1552e8
    • Sam McCall's avatar
      [CodeComplete] Remove obsolete isOutputBinary(). · 3a75330f
      Sam McCall authored
      Summary:
      It's never set to true. Its only effect would be to set stdout to binary mode.
      Hopefully we have better ways of doing this by now :-)
      
      Reviewers: hokein
      
      Subscribers: jkorous, arphaman, kadircet, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D60871
      
      llvm-svn: 358696
      3a75330f
    • Kristof Umann's avatar
      [analyzer][NFC] Prefer binary searches in CheckerRegistry · 640f7b58
      Kristof Umann authored
      Differential Revision: https://reviews.llvm.org/D59459
      
      llvm-svn: 358695
      640f7b58
    • Kristof Umann's avatar
      [analyzer][NFC] Clang-format CheckerRegistry · a57d4ea3
      Kristof Umann authored
      Differential Revision: https://reviews.llvm.org/D59458
      
      llvm-svn: 358694
      a57d4ea3
    • Jonas Devlieghere's avatar
      [Docs] Add LLDB bots · f2293a95
      Jonas Devlieghere authored
      llvm-svn: 358693
      f2293a95
    • Simon Pilgrim's avatar
      [X86] combineVectorTruncationWithPACKUS - remove split/concatenation of mask · 4171a91e
      Simon Pilgrim authored
      combineVectorTruncationWithPACKUS is currently splitting the upper bit bit masking into 128-bit subregs and then concatenating them back together.
      
      This was originally done to avoid regressions that caused existing subregs to be concatenated to the larger type just for the AND masking before being extracted again. This was fixed by @spatel (notably rL303997 and rL347356).
      
      This also lets SimplifyDemandedBits do some further improvements before it hits the recursive depth limit.
      
      My only annoyance with this is that we were broadcasting some xmm masks but we seem to have lost them by moving to ymm - but that's a known issue as the logic in lowerBuildVectorAsBroadcast isn't great.
      
      Differential Revision: https://reviews.llvm.org/D60375#inline-539623
      
      llvm-svn: 358692
      4171a91e
    • Yitzhak Mandelbaum's avatar
      [LibTooling] Add Stencil library for format-string style codegen. · e955f8ba
      Yitzhak Mandelbaum authored
      Summary:
      This file defines the *Stencil* abstraction: a code-generating object, parameterized by named references to (bound) AST nodes.  Given a match result, a stencil can be evaluated to a string of source code.
      
      A stencil is similar in spirit to a format string: it is composed of a series of raw text strings, references to nodes (the parameters) and helper code-generation operations.
      
      See thread on cfe-dev list with subject "[RFC] Easier source-to-source transformations with clang tooling" for background.
      
      Reviewers: sbenza
      
      Reviewed By: sbenza
      
      Subscribers: ilya-biryukov, mgorny, jfb, jdoerfert, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D59371
      
      llvm-svn: 358691
      e955f8ba
    • Louis Dionne's avatar
      [libc++] Make sure we re-export some missing libc++abi symbols from libc++ · 549048f3
      Louis Dionne authored
      Summary:
      Ensure we re-export __cxa_throw_bad_array_new_length and
      __cxa_uncaught_exceptions from libc++, since they are now
      provided by libc++abi.
      
      Doing this allows us to stop linking explicitly against libc++abi in
      the libc++abi tests, since libc++ re-exports all the necessary symbols.
      However, there is one caveat to that. We don't want libc++ to re-export
      __cxa_uncaught_exception (the singular form), since it's only provided
      for backwards compatibility. Hence, for the single test where we check
      this backwards compatibility, we explicitly link against libc++abi.
      
      PR27405
      PR22654
      
      Reviewers: EricWF
      
      Subscribers: christof, jkorous, dexonsmith, libcxx-commits
      
      Tags: #libc
      
      Differential Revision: https://reviews.llvm.org/D60424
      
      llvm-svn: 358690
      549048f3
    • Krasimir Georgiev's avatar
      [clang-format] Fix indent of trailing raw string param after newline · bda8482a
      Krasimir Georgiev authored
      Summary:
      Currently clang-format uses ContinuationIndent to indent the contents of a raw
      string literal that is the last parameter of the function call. This is to
      achieve formatting similar to trailing:
      ```
      f(1, 2, R"pb(
          x: y)pb");
      ```
      However this had the unfortunate consequence of producing format like this:
      ```
      fffffff(1, 2,
              R"pb(
          a: b
              )pb");
      ```
      
      This patch makes clang-format consider indenting a trailing raw string param
      after a newline based off the start of the format delimiter, producing:
      ```
      fffffff(1, 2,
              R"pb(
                a: b
              )pb");
      ```
      
      Reviewers: djasper
      
      Reviewed By: djasper
      
      Subscribers: cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D60558
      
      llvm-svn: 358689
      bda8482a
    • Philip Reames's avatar
      [LoopPred] Fix a blatantly obvious bug in r358684 · adf288c5
      Philip Reames authored
      The bug is that I didn't check whether the operand of the invariant_loads were themselves invariant.  I don't know how this got missed in the patch and review.  I even had an unreduced test case locally, and I remember handling this case, but I must have lost it in one of the rebases.  Oops.
      
      llvm-svn: 358688
      adf288c5
    • Sanjay Patel's avatar
      [x86] add tests for improved insertelement to index 0 (PR41512); NFC · 51fa60bc
      Sanjay Patel authored
      Patch proposal in D60852.
      
      llvm-svn: 358687
      51fa60bc
    • Stefan Granitz's avatar
      [CMake] Emit LLDB.framework.dSYM to avoid potential name collision with driver's lldb.dSYM · 31d0ce00
      Stefan Granitz authored
      Summary:
      Emit framework's dSYM bundle as LLDB.framework.dSYM instead of LLDB.dSYM, because the latter could conflict with the driver's lldb.dSYM when emitted in the same directory on case-insensitive file systems.
      Requires https://reviews.llvm.org/D60862
      
      Reviewers: friss, beanz, bogner
      
      Subscribers: mgorny, lldb-commits, #lldb
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D60863
      
      llvm-svn: 358686
      31d0ce00
    • Stefan Granitz's avatar
      [CMake] Allow custom extensions for externalized debug info · ab58268f
      Stefan Granitz authored
      Summary:
      Extra flexibility for emitting debug info to external files (remains Darwin only for now).
      LLDB needs this functionality to emit a LLDB.framework.dSYM instead of LLDB.dSYM when building the framework, because the latter could conflict with the driver's lldb.dSYM when emitted in the same directory on case-insensitive file systems.
      
      Reviewers: friss, bogner, beanz
      
      Subscribers: mgorny, aprantl, llvm-commits, #lldb
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D60862
      
      llvm-svn: 358685
      ab58268f
    • Philip Reames's avatar
      [LoopPredication] Allow predication of loop invariant computations (within the loop) · 92a7177e
      Philip Reames authored
      The purpose of this patch is to eliminate a pass ordering dependence between LoopPredication and LICM. To understand the purpose, consider the following snippet of code inside some loop 'L' with IV 'i'
      A = _a.length;
      guard (i < A)
      a = _a[i]
      B = _b.length;
      guard (i < B);
      b = _b[i];
      ...
      Z = _z.length;
      guard (i < Z)
      z = _z[i]
      accum += a + b + ... + z;
      
      Today, we need LICM to hoist the length loads, LoopPredication to make the guards loop invariant, and TrivialUnswitch to eliminate the loop invariant guard to establish must execute for the next length load. Today, if we can't prove speculation safety, we'd have to iterate these three passes 26 times to reduce this example down to the minimal form.
      
      Using the fact that the array lengths are known to be invariant, we can short circuit this iteration. By forming the loop invariant form of all the guards at once, we remove the need for LoopPredication from the iterative cycle. At the moment, we'd still have to iterate LICM and TrivialUnswitch; we'll leave that part for later.
      
      As a secondary benefit, this allows LoopPred to expose peeling oppurtunities in a much more obvious manner.  See the udiv test changes as an example.  If the udiv was not hoistable (i.e. we couldn't prove speculation safety) this would be an example where peeling becomes obviously profitable whereas it wasn't before.
      
      A couple of subtleties in the implementation:
      - SCEV's isSafeToExpand guarantees speculation safety (i.e. let's us expand at a new point).  It is not a precondition for expansion if we know the SCEV corresponds to a Value which dominates the requested expansion point.
      - SCEV's isLoopInvariant returns true for expressions which compute the same value across all iterations executed, regardless of where the original Value is located.  (i.e. it can be in the loop)  This implies we have a speculation burden to prove before expanding them outside loops.
      - invariant_loads and AA->pointsToConstantMemory are two cases that SCEV currently does not handle, but meets the SCEV definition of invariance.  I plan to sink this part into SCEV once this has baked for a bit.
      
      Differential Revision: https://reviews.llvm.org/D60093
      
      llvm-svn: 358684
      92a7177e
    • Pavel Labath's avatar
      Clean up docstrings in swig interface files · eba97426
      Pavel Labath authored
      Summary:
      This patch removes the "//----" frames and "///" leading lines from
      docstring comments.  We already have code doing transformations like this in
      modify-python-lldb.py, but that's a script I'd like to remove. Instead
      of running these transformations everytime we run swig, we can just
      perform equivalent on its input once.
      
      This patch can be reproduced (e.g. for downstream merges) with the
      following "sweet" perl command:
      
        perl -i -p -e 'BEGIN{ $/ = undef;} s:(" *\n) *//-----*\n:\1:gs; s:^(     *)/// ?:\1:gsm; s:^ *//------*\n( *\n)?( *"):\2:gsm; s: *$::gsm; s:\n *"\):"):gsm' scripts/interface/*.i
      
      This command produces nearly equivalent python files to those produced
      by the relevant code in modify-python-lldb.py. The only difference I
      noticed is that here I am slightly more agressive in removing trailing
      newlines from docstring comments (the python script seems to leave
      newlines in class-level docstrings).
      
      Reviewers: amccarth, clayborg, jingham, aprantl
      
      Subscribers: lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D60498
      
      llvm-svn: 358683
      eba97426
    • Dan Liew's avatar
      [asan_symbolize] Workaround bug in old Python 2 versions. · 16c3883b
      Dan Liew authored
      The change landed in r358657 broke some of the buildbots because they
      use an older version of Python 2 that raises this error.
      
      ```
      File "/Volumes/data/dev/llvm/upstream/master/src/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py", line 509
        exec(f.read(), globals_space, None)
      SyntaxError: unqualified exec is not allowed in function 'load_plugin_from_file' it contains a nested function with free variables
      ```
      
      I can reproduce this problem when using Python 2.7.6.
      
      To workaround this some indirection has been added to prevent the broken
      (the line at fault would never be executed) SyntaxError error in old
      Python versions from being raised.
      
      rdar://problem/49476995
      
      llvm-svn: 358682
      16c3883b
    • Nicolai Haehnle's avatar
      [SDA] Bug fix: Use IPD outside the loop as divergence bound · 523f90a2
      Nicolai Haehnle authored
      Summary:
      The immediate post dominator of the loop header may be part of the divergent loop.
      Since this /was/ the divergence propagation bound the SDA would not detect joins of divergent paths outside the loop.
      
      Reviewers: nhaehnle
      
      Reviewed By: nhaehnle
      
      Subscribers: mmasten, arsenm, jvesely, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D59042
      
      llvm-svn: 358681
      523f90a2
    • Philip Reames's avatar
      Fix a bug in SCEV's isSafeToExpand around speculation safety · b2c9fc02
      Philip Reames authored
      isSafeToExpand was making a common, but dangerously wrong, mistake in assuming that if any instruction within a basic block executes, that all instructions within that block must execute.  This can be trivially shown to be false by considering the following small example:
      bb:
        add x, y  <-- InsertionPoint
        call @throws()
        udiv x, y <-- SCEV* S
        br ...
      
      It's clearly not legal to expand S above the throwing call, but the previous logic would do so since S dominates (but not properlyDominates) the block containing the InsertionPoint.
      
      Since iterating instructions w/in a block is expensive, this change special cases two cases: 1) S is an operand of InsertionPoint, and 2) InsertionPoint is the terminator of it's block.  These two together are enough to keep all current optimizations triggering while fixing the latent correctness issue.
      
      As best I can tell, this is a silent bug in current ToT.  Given that, there's no tests with this change.  It was noticed in an upcoming optimization change (D60093), and was reviewed as part of that.  That change will include the test which caused me to notice the issue.  I'm submitting this seperately so that anyone bisecting a problem gets a clear explanation.
      
      llvm-svn: 358680
      b2c9fc02
  2. Apr 18, 2019