Skip to content
  1. Jul 09, 2018
    • Diego Caballero's avatar
      [VPlan][LV] Introduce condition bit in VPBlockBase · d0953014
      Diego Caballero authored
      This patch introduces a VPValue in VPBlockBase to represent the condition
      bit that is used as successor selector when a block has multiple successors.
      This information wasn't necessary until now, when we are about to introduce
      outer loop vectorization support in VPlan code gen.
      
      Reviewers: fhahn, rengolin, mkuper, hfinkel, mssimpso
      
      Reviewed By: fhahn
      
      Differential Revision: https://reviews.llvm.org/D48814
      
      llvm-svn: 336554
      d0953014
    • Sam McCall's avatar
      [Support] Allow JSON serialization of Optional<T> for supported T. · 7e4234fc
      Sam McCall authored
      This is ported from r333881 to JSON's new home.
      
      llvm-svn: 336542
      7e4234fc
    • Sam McCall's avatar
      [Support] Make JSON handle doubles and int64s losslessly · d93eaeb7
      Sam McCall authored
      Summary:
      This patch adds a new "integer" ValueType, and renames Number -> Double.
      This allows us to preserve the full precision of int64_t when parsing integers
      from the wire, or constructing from an integer.
      The API is unchanged, other than giving asInteger() a clearer contract.
      
      In addition, always output doubles with enough precision that parsing will
      reconstruct the same double.
      
      Reviewers: simon_tatham
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D46209
      
      llvm-svn: 336541
      d93eaeb7
    • Sam McCall's avatar
      Lift JSON library from clang-tools-extra/clangd to llvm/Support. · 6be38247
      Sam McCall authored
      Summary:
      This consists of four main parts:
       - an type json::Expr representing JSON values of dynamic kind, which can be
         composed, inspected, and modified
       - a JSON parser from string -> json::Expr
       - a JSON printer from json::Expr -> string, with optional pretty-printing
       - a convention for mapping json::Expr <=> native types (fromJSON/toJSON)
         Mapping functions are provided for primitives (e.g. int, vector) and the
         ObjectMapper helper helps implement fromJSON for struct/object types.
      
      Based on clangd's usage, a couple of places I'd appreciate review attention:
       - fromJSON returns only bool. A richer error-signaling mechanism may be useful
         to provide useful messages, or let recursive fromJSONs (containers/structs)
         do careful error recovery.
       - should json::obj be always explicitly written (like json::ary)
       - there's no streaming parse API. I suspect there are some simple wins like
         a callback API where the document is a long array, and each element is small.
         But this can probably be bolted on easily when we see the need.
      
      Reviewers: bkramer, labath
      
      Subscribers: mgorny, ilya-biryukov, ioeric, MaskRay, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D45753
      
      llvm-svn: 336534
      6be38247
  2. Jul 07, 2018
    • Chijun Sima's avatar
      Test commit · 1d274061
      Chijun Sima authored
      llvm-svn: 336485
      1d274061
    • Chandler Carruth's avatar
      [Support] Clear errno before calling the function in RetryAfterSignal. · 9659a127
      Chandler Carruth authored
      For certain APIs, the return value of the function does not distinguish
      between failure (which populates errno) and other non-error conditions
      (which do not set errno).
      
      For example, `fgets` returns `NULL` both when an error has occurred, or
      upon EOF. If `errno` is already `EINTR` for whatever reason, then
      ```
      RetryAfterSignal(nullptr, fgets, ...);
      ```
      on a stream that has reached EOF would infinite loop.
      
      Fix this by setting `errno` to `0` before each attempt in
      `RetryAfterSignal`.
      
      Patch by Ricky Zhou!
      
      Differential Revision: https://reviews.llvm.org/D48755
      
      llvm-svn: 336479
      9659a127
  3. Jul 06, 2018
    • Vedant Kumar's avatar
      [Local] replaceAllDbgUsesWith: Update debug values before RAUW · 6379a622
      Vedant Kumar authored
      The replaceAllDbgUsesWith utility helps passes preserve debug info when
      replacing one value with another.
      
      This improves upon the existing insertReplacementDbgValues API by:
      
      - Updating debug intrinsics in-place, while preventing use-before-def of
        the replacement value.
      - Falling back to salvageDebugInfo when a replacement can't be made.
      - Moving the responsibiliy for rewriting llvm.dbg.* DIExpressions into
        common utility code.
      
      Along with the API change, this teaches replaceAllDbgUsesWith how to
      create DIExpressions for three basic integer and pointer conversions:
      
      - The no-op conversion. Applies when the values have the same width, or
        have bit-for-bit compatible pointer representations.
      - Truncation. Applies when the new value is wider than the old one.
      - Zero/sign extension. Applies when the new value is narrower than the
        old one.
      
      Testing:
      
      - check-llvm, check-clang, a stage2 `-g -O3` build of clang,
        regression/unit testing.
      - This resolves a number of mis-sized dbg.value diagnostics from
        Debugify.
      
      Differential Revision: https://reviews.llvm.org/D48676
      
      llvm-svn: 336451
      6379a622
    • Sam McCall's avatar
      [Support] Make support types more easily printable. · 8ca99100
      Sam McCall authored
      Summary:
      Error's new operator<< is the first way to print an error without consuming it.
      
      formatv() can now print objects with an operator<< that works with raw_ostream.
      
      Reviewers: bkramer
      
      Subscribers: mgorny, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D48966
      
      llvm-svn: 336412
      8ca99100
    • Mandeep Singh Grang's avatar
      [OpenEmbedded] Add OpenEmbedded vendor · 083f4d7d
      Mandeep Singh Grang authored
      Summary: The lib paths are not correctly picked up for OpenEmbedded sysroots
      (like arm-oe-linux-gnueabi). I fix this in a follow-up clang patch. But in
      order to add the correct libs I need to detect if the vendor is oe. For this
      reason, it is first necessary to teach llvm to detect oe vendor, which is what
      this patch does.
      
      Reviewers: chandlerc, compnerd, rengolin, javed.absar
      
      Reviewed By: compnerd
      
      Subscribers: kristof.beyls, dexonsmith, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D48861
      
      llvm-svn: 336401
      083f4d7d
  4. Jul 04, 2018
  5. Jul 03, 2018
    • John Brawn's avatar
      [llvm-exegesis] Adjust AArch64 unit test · b371ccc6
      John Brawn authored
      The signature of setRegToConstant changed in r336171, so adjust the AArch64
      unit test in a similar way to how the X86 unit test was changed in that commit.
      
      llvm-svn: 336188
      b371ccc6
    • John Brawn's avatar
      [llvm-exegesis] Add an AArch64 target · c4ed6004
      John Brawn authored
      The target does just enough to be able to run llvm-exegesis in latency mode for
      at least some opcodes.
      
      Differential Revision: https://reviews.llvm.org/D48780
      
      llvm-svn: 336187
      c4ed6004
    • Chandler Carruth's avatar
      [Support] This sanity check in the test only works with certain versions · 9e0108d9
      Chandler Carruth authored
      of libstdc++, not just certain versions of GCC. The original macros
      broke when using Clang + libstdc++4.9 sadly.
      
      Sadly, testing for versions of libstdc++ has been extremely problematic
      in the past, so I'm just narrowing this down to Windows and when using
      libc++ as that seems at least very unlikely to keep build bots broken.
      
      llvm-svn: 336174
      9e0108d9
    • Clement Courbet's avatar
      [llvm-exegesis] ExegisX86Target::setRegToConstant() should depend on the subtarget features. · e785169f
      Clement Courbet authored
      Summary: This fixes PR38008.
      
      Reviewers: gchatelet, RKSimon
      
      Subscribers: tschuett, craig.topper, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D48820
      
      llvm-svn: 336171
      e785169f
    • Jakub Kuderski's avatar
      Reappl "[Dominators] Add the DomTreeUpdater class" · 5e3ab7a9
      Jakub Kuderski authored
      Summary:
      This patch is the first in a series of patches related to the [[ http://lists.llvm.org/pipermail/llvm-dev/2018-June/123883.html | RFC - A new dominator tree updater for LLVM ]].
      
      This patch introduces the DomTreeUpdater class, which provides a cleaner API to perform updates on available dominator trees (none, only DomTree, only PostDomTree, both) using different update strategies (eagerly or lazily) to simplify the updating process.
      
      —Prior to the patch—
      
         - Directly calling update functions of DominatorTree updates the data structure eagerly while DeferredDominance does updates lazily.
         - DeferredDominance class cannot be used when a PostDominatorTree also needs to be updated.
         - Functions receiving DT/DDT need to branch a lot which is currently necessary.
         - Functions using both DomTree and PostDomTree need to call the update function separately on both trees.
         - People need to construct an additional DeferredDominance class to use functions only receiving DDT.
      
      —After the patch—
      
      Patch by Chijun Sima <simachijun@gmail.com>.
      
      Reviewers: kuhar, brzycki, dmgreen, grosser, davide
      
      Reviewed By: kuhar, brzycki
      
      Author: NutshellySima
      
      Subscribers: vsk, mgorny, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D48383
      
      llvm-svn: 336163
      5e3ab7a9
    • Chandler Carruth's avatar
      [Support] Fix llvm::unique_function when building with GCC 4.9 by · f814ad89
      Chandler Carruth authored
      introducing llvm::trivially_{copy,move}_constructible type traits.
      
      This uses a completely portable implementation of these traits provided
      by Richard Smith. You can see it on compiler explorer in all its glory:
      
        https://godbolt.org/g/QEDZjW
      
      I have transcribed it, clang-formatted it, added some comments, and made
      the tests fit into a unittest file.
      
      I have also switched llvm::unique_function over to use these new, much
      more portable traits. =D
      
      Hopefully this will fix the build bot breakage from my prior commit.
      
      llvm-svn: 336161
      f814ad89
    • Chandler Carruth's avatar
      [ADT] Add llvm::unique_function which is like std::function but · aa60b3fd
      Chandler Carruth authored
      supporting move-only closures.
      
      Most of the core optimizations for std::function are here plus
      a potentially novel one that detects trivially movable and destroyable
      functors and implements those with fewer indirections.
      
      This is especially useful as we start trying to add concurrency
      primitives as those often end up with move-only types (futures,
      promises, etc) and wanting them to work through lambdas.
      
      As further work, we could add better support for things like const-qualified
      operator()s to support more algorithms, and r-value ref qualified operator()s
      to model call-once. None of that is here though.
      
      We can also provide our own llvm::function that has some of the optimizations
      used in this class, but with copy semantics instead of move semantics.
      
      This is motivated by increasing usage of things like executors and the task
      queue where it is useful to embed move-only types like a std::promise within
      a type erased function. That isn't possible without this version of a type
      erased function.
      
      Differential Revision: https://reviews.llvm.org/D48349
      
      llvm-svn: 336156
      aa60b3fd
  6. Jul 02, 2018
    • Jakub Kuderski's avatar
      Revert "[Dominators] Add the DomTreeUpdater class" · 198f3b16
      Jakub Kuderski authored
      Temporary revert because of a failing test on some buildbots.
      
      This reverts commit r336114.
      
      llvm-svn: 336117
      198f3b16
    • Jakub Kuderski's avatar
      [Dominators] Add the DomTreeUpdater class · e813a9b3
      Jakub Kuderski authored
      Summary:
      This patch is the first in a series of patches related to the [[ http://lists.llvm.org/pipermail/llvm-dev/2018-June/123883.html | RFC - A new dominator tree updater for LLVM ]].
      
      This patch introduces the DomTreeUpdater class, which provides a cleaner API to perform updates on available dominator trees (none, only DomTree, only PostDomTree, both) using different update strategies (eagerly or lazily) to simplify the updating process.
      
      —Prior to the patch—
      
         - Directly calling update functions of DominatorTree updates the data structure eagerly while DeferredDominance does updates lazily.
         - DeferredDominance class cannot be used when a PostDominatorTree also needs to be updated.
         - Functions receiving DT/DDT need to branch a lot which is currently necessary.
         - Functions using both DomTree and PostDomTree need to call the update function separately on both trees.
         - People need to construct an additional DeferredDominance class to use functions only receiving DDT.
      
      —After the patch—
      
      Patch by Chijun Sima <simachijun@gmail.com>.
      
      Reviewers: kuhar, brzycki, dmgreen, grosser, davide
      
      Reviewed By: kuhar, brzycki
      
      Subscribers: vsk, mgorny, llvm-commits
      
      Author: NutshellySima
      
      Differential Revision: https://reviews.llvm.org/D48383
      
      llvm-svn: 336114
      e813a9b3
  7. Jun 28, 2018
  8. Jun 27, 2018
  9. Jun 26, 2018
Loading