Skip to content
  1. Nov 22, 2018
    • Chandler Carruth's avatar
      [TI removal] Leverage the fact that TerminatorInst is gone to create · e429c794
      Chandler Carruth authored
      a normal base class that provides all common "call" functionality.
      
      This merges two complex CRTP mixins for the common "call" logic and
      common operand bundle logic into a single, normal base class of
      `CallInst` and `InvokeInst`. Going forward, users can typically
      `dyn_cast<CallBase>` and use the resulting API. No more need for the
      `CallSite` wrapper. I'm planning to migrate current usage of the wrapper
      to directly use the base class and then it can be removed, but those are
      simpler and much more incremental steps. The big change is to introduce
      this abstraction into the type system.
      
      I've tried to do some basic simplifications of the APIs that I couldn't
      really help but touch as part of this:
      - I've tried to organize the attribute API and bundle API into groups to
        make understanding the API of `CallBase` easier. Without this,
        I wasn't able to navigate the API sanely for all of the ways I needed
        to modify it.
      - I've added what seem like more clear and consistent APIs for getting
        at the called operand. These ended up being especially useful to
        consolidate the *numerous* duplicated code paths trying to do this.
      - I've largely reworked the organization and implementation of the APIs
        for computing the argument operands as they needed to change to work
        with the new subclass approach.
      
      To minimize any cost associated with this abstraction, I've moved the
      operand layout in memory to store the called operand last. This makes
      its position relative to the end of the operand array the same,
      regardless of the subclass. It should make it much cheaper to reference
      from the `CallBase` abstraction, and this is likely one of the most
      frequent things to query.
      
      We do still pay one abstraction penalty here: we have to branch to
      determine whether there are 0 or 2 extra operands when computing the end
      of the argument operand sequence. However, that seems both rare and
      should optimize well. I've implemented this in a way specifically
      designed to allow it to optimize fairly well. If this shows up in
      profiles, we can add overrides of the relevant methods to the subclasses
      that bypass this penalty. It seems very unlikely that this will be an
      issue as the code was *already* dealing with an ever present abstraction
      of whether or not there are operand bundles, so this isn't the first
      branch to go into the computation.
      
      I've tried to remove as much of the obvious vestigial API surface of the
      old CRTP implementation as I could, but I suspect there is further
      cleanup that should now be possible, especially around the operand
      bundle APIs. I'm leaving all of that for future work in this patch as
      enough things are changing here as-is.
      
      One thing that made this harder for me to reason about and debug was the
      pervasive use of unsigned values in subtraction and other arithmetic
      computations. I had to debug more than one unintentional wrap. I've
      switched a few of these to use `int` which seems substantially simpler,
      but I've held back from doing this more broadly to avoid creating
      confusing divergence within a single class's API.
      
      I also worked to remove all of the magic numbers used to index into
      operands, putting them behind named constants or putting them into
      a single method with a comment and strictly using the method elsewhere.
      This was necessary to be able to re-layout the operands as discussed
      above.
      
      Thanks to Ben for reviewing this (somewhat large and awkward) patch!
      
      Differential Revision: https://reviews.llvm.org/D54788
      
      llvm-svn: 347452
      e429c794
    • David Carlier's avatar
      Unbreak FreeBSD build. · 0a01f5d2
      David Carlier authored
      M    lib/sanitizer_common/sanitizer_platform_limits_posix.cc
      
      llvm-svn: 347451
      0a01f5d2
    • Sam McCall's avatar
      [clangd] Respect task cancellation in TUScheduler. · a2b048bc
      Sam McCall authored
      Summary:
      - Reads are never executed if canceled before ready-to run.
        In practice, we finalize cancelled reads eagerly and out-of-order.
      - Cancelled reads don't prevent prior updates from being elided, as they don't
        actually depend on the result of the update.
      - Updates are downgraded from WantDiagnostics::Yes to WantDiagnostics::Auto when
        cancelled, which allows them to be elided when all dependent reads are
        cancelled and there are subsequent writes. (e.g. when the queue is backed up
        with cancelled requests).
      
      The queue operations aren't optimal (we scan the whole queue for cancelled
      tasks every time the scheduler runs, and check cancellation twice in the end).
      However I believe these costs are still trivial in practice (compared to any
      AST operation) and the logic can be cleanly separated from the rest of the
      scheduler.
      
      Reviewers: ilya-biryukov
      
      Subscribers: javed.absar, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D54746
      
      llvm-svn: 347450
      a2b048bc
    • Haojian Wu's avatar
      Move the llvm lit test dependencies to clang-tools-extra. · af5b1603
      Haojian Wu authored
      Summary: Part of revert r343473
      
      Reviewers: mgorny
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D54798
      
      llvm-svn: 347449
      af5b1603
    • Haojian Wu's avatar
      Revert r343473 "Move llvm util dependencies from clang-tools-extra to add_lit_target." · 36f48c55
      Haojian Wu authored
      Summary:
      It will cause test tools `FileCheck`, `count`, `not` being built blindly, these
      dependencies should move back to clang-tools-extra.
      
      Reviewers: mgorny
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54797
      
      llvm-svn: 347448
      36f48c55
    • Diana Picus's avatar
      [ARM GlobalISel] Add test for BFC. NFCI · 6b376557
      Diana Picus authored
      r334871 has made it possible for TableGen'erated code to select BFC, but
      it has not added a test for it on the ARM side. Add it now to make sure
      we don't introduce regressions if we ever change anything about that
      rule.
      
      llvm-svn: 347447
      6b376557
    • Bill Wendling's avatar
      The result of is.constant() is unsigned. · 2a6c59ea
      Bill Wendling authored
      llvm-svn: 347446
      2a6c59ea
    • Jonas Paulsson's avatar
      [SystemZTTIImpl] Give correct cost values for vector bswap intrinsics. · 96782c2c
      Jonas Paulsson authored
      Implement getIntrinsicInstrCost() and return costs reflecting that bswap can
      be done with a vperm per vector register.
      
      Review: Ulrich Weigand
      https://reviews.llvm.org/D54789
      
      llvm-svn: 347445
      96782c2c
    • Petr Hosek's avatar
      [Driver] Support XRay on Fuchsia · da914318
      Petr Hosek authored
      This enables support for XRay in Fuchsia Clang driver.
      
      Differential Revision: https://reviews.llvm.org/D52160
      
      llvm-svn: 347444
      da914318
    • Petr Hosek's avatar
      [XRay] Support for Fuchsia · e7dec784
      Petr Hosek authored
      This extends XRay to support Fuchsia.
      
      Differential Revision: https://reviews.llvm.org/D52162
      
      llvm-svn: 347443
      e7dec784
    • Peter Collingbourne's avatar
      tsan: Update measurements in check_analyze.sh. · 56f3bb4b
      Peter Collingbourne authored
      These changed as a result of r347379. Unfortunately there was a
      regression; filed PR39748 to track it.
      
      Differential Revision: https://reviews.llvm.org/D54821
      
      llvm-svn: 347442
      56f3bb4b
    • Fangrui Song's avatar
      [llvm-size] Use empty() and range-based for loop. NFC · 64449e6f
      Fangrui Song authored
      llvm-svn: 347441
      64449e6f
    • Evandro Menezes's avatar
      [llvm-mca] Add test case (NFC) · d0792170
      Evandro Menezes authored
      Add test case that will serve as the base for D54820.
      
      llvm-svn: 347440
      d0792170
    • Peter Collingbourne's avatar
      tsan: Correct the name of an executable. · c5610930
      Peter Collingbourne authored
      llvm-svn: 347439
      c5610930
    • Sanjay Patel's avatar
      [x86] use FileCheck to verify output; NFC · 1afd38f0
      Sanjay Patel authored
      llvm-svn: 347438
      1afd38f0
    • Evandro Menezes's avatar
      [llvm-mca] Add test case (NFC) · b9f90426
      Evandro Menezes authored
      Fix previous commit r347434.
      
      llvm-svn: 347437
      b9f90426
    • Peter Collingbourne's avatar
      Add a ubsan blacklist entry for libstdc++ 8.0.1. · e0deb354
      Peter Collingbourne authored
      llvm-svn: 347436
      e0deb354
    • Louis Dionne's avatar
  2. Nov 21, 2018
Loading