1. Mar 26, 2020
    • Alina Sbirlea's avatar
      [CFG/BasicBlock] Rename succ_const to const_succ. [NFC] · 3abcbf99
      Alina Sbirlea authored
      Summary:
      Rename `succ_const_iterator` to `const_succ_iterator` and
      `succ_const_range` to `const_succ_range` for consistency with the
      predecessor iterators, and the corresponding iterators in
      MachineBasicBlock.
      
      Reviewers: nicholas, dblaikie, nlewycky
      
      Subscribers: hiraditya, bmahjour, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D75952
      3abcbf99
    • Erich Keane's avatar
      Implement post-commit comments for D75685/rG86e0a6c6 · fe5c719e
      Erich Keane authored
      @Anastasia made a pair of comments on D75685 after it was committed
      requesting changes to the test.  This patch updates the test based on
      her comments.
      fe5c719e
    • River Riddle's avatar
      [mlir] Remove old VectorOps directory · 8e83d5ea
      River Riddle authored
      This was accidentally re-added during a rebase.
      8e83d5ea
    • Alexander Belyaev's avatar
      [Clang] Fix clang-tidy errors. · df48e392
      Alexander Belyaev authored
      df48e392
    • Frej Drejhammar's avatar
      [mlir][Parser] Fix attribute parser errors for ui64 · d8981ce5
      Frej Drejhammar authored
      Summary:
      The attribute parser fails to correctly parse unsigned 64 bit
      attributes as the check `isNegative ? (int64_t)-val.getValue() >= 0
      : (int64_t)val.getValue() < 0` will falsely detect an overflow for
      unsigned values larger than 2^63-1.
      
      This patch reworks the overflow logic to instead of doing arithmetic
      on int64_t use APInt::isSignBitSet() and knowledge of the attribute
      type.
      
      Test-cases which verify the de-facto behavior of the parser and
      triggered the previous faulty handing of unsigned 64 bit attrbutes are
      also added.
      
      Differential Revision: https://reviews.llvm.org/D76493
      d8981ce5
    • Heejin Ahn's avatar
      [WebAssembly] Move event section before global section · f93426c5
      Heejin Ahn authored
      Summary:
      https://github.com/WebAssembly/exception-handling/issues/98
      
      Also this moves many parts of code to make code align with the section
      order, even if they don't affect the output.
      
      Reviewers: tlively
      
      Subscribers: dschuff, sbc100, hiraditya, sunfish, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D76752
      f93426c5
    • Louis Dionne's avatar
      [libc++] Drop custom support for flaky tests from libc++ test suite · f03ac381
      Louis Dionne authored
      Instead, use the builtin support in lit. This makes the libc++ custom
      test format slightly closer to the builtin ShTest format in behavior.
      f03ac381
    • Erich Keane's avatar
      Fix vector type scalar checking when the scalar operand is dependent · 044c51d8
      Erich Keane authored
      As reported in PR45298 and PR45299, vector_size type checking would
      crash when done in a situation where the scalar is dependent, such as
      a member of the current instantiation.
      
      This is because the scalar checking ensures that you can implicitly
      convert a value to a vector-type as long as it doesn't require
      truncation. It does this by using the constant evaluator to get the
      value as a float. Unfortunately, if the scalar is dependent (such as a
      member of the current instantiation), we would hit the assert in the
      evaluator.
      
      This patch suppresses the truncation- of-value check in the first phase
      of translation. All values are properly errored upon instantiation. This
      has one minor regression, in that previously in a non-asserts build,
      
      template<typename T>
      struct S {
        float4 f(float4 f) {
          return k + f;
        }
        static constexpr k = 1.1; // causes a truncation on conversion.
      };
      
      would error immediately. Because 'k' is value dependent (as a
      member-of-the-current-instantiation), this would still be evaluatable
      (despite normally asserting).  Due to this patch, this diagnostic is
      delayed until instantiation time.
      044c51d8
    • Alexandre Ganea's avatar
      [ThinLTO] Don't rely on debug output for thinlto_samplepgo_icp3 test · 934d4fea
      Alexandre Ganea authored
      Because using -print-imports is not thread-safe, make the test rely on llvm-dis instead.
      Also cover the ICALL-PROM part as intended originally.
      
      Differential Revision: https://reviews.llvm.org/D76775
      934d4fea
    • Nico Weber's avatar
      13d267e3
    • Louis Dionne's avatar
      95977a76
    • Eli Friedman's avatar
    • Nico Weber's avatar
      Suppress a few -Wunreachable-code warnings. · d7888149
      Nico Weber authored
      No behavior change. Also fix a comment to say match reality.
      d7888149
    • Simon Pilgrim's avatar
      [X86][AVX] Combine shuffles to TRUNCATE/VTRUNC patterns · c6e5531f
      Simon Pilgrim authored
      Add support for combining shuffles to AVX512 truncate instructions - another step toward fixing D56387/D66004. It also fixes SKX code on PR31443.
      
      We could probably extend this further to handle non-VLX truncation cases.
      c6e5531f
    • Gil Rapaport's avatar
      [LV] Replace stored value with a VPValue (NFCI) · 078c8633
      Gil Rapaport authored
      InnerLoopVectorizer's code called during VPlan execution still relies on
      original IR's def-use relations to decide which vector code to generate,
      limiting VPlan transformations ability to modify def-use relations and still
      have ILV generate the vector code.
      This commit introduces a VPValue for VPWidenMemoryInstructionRecipe to use as
      the stored value. The recipe is generated with a VPValue wrapping the stored
      value of the scalar store. This reduces ingredient def-use usage by ILV as a
      step towards full VPlan-based def-use relations.
      
      Differential Revision: https://reviews.llvm.org/D76373
      078c8633
    • Tyker's avatar
    • Nico Weber's avatar
      717d7e3f
    • Siva Chandra Reddy's avatar
      [libc] Add a simple x86_64 linux loader. · f6ccb4fe
      Siva Chandra Reddy authored
      This adds a very simple loader. This will be extended to a full loader
      in future patches. A utility rule to add unittests has been added to
      serve us while we are building out the full loader.
      
      Reviewers: abrachet, phosek
      
      Differential Revision: https://reviews.llvm.org/D76412
      f6ccb4fe
    • Mikhail Maltsev's avatar
      [ARM,CDE] Implement predicated Q-register CDE intrinsics · bb4da94e
      Mikhail Maltsev authored
      Summary:
      This patch implements the following CDE intrinsics:
      
        T __arm_vcx1q_m(int coproc, T inactive, uint32_t imm, mve_pred_t p);
        T __arm_vcx2q_m(int coproc, T inactive, U n, uint32_t imm, mve_pred_t p);
        T __arm_vcx3q_m(int coproc, T inactive, U n, V m, uint32_t imm, mve_pred_t p);
      
        T __arm_vcx1qa_m(int coproc, T acc, uint32_t imm, mve_pred_t p);
        T __arm_vcx2qa_m(int coproc, T acc, U n, uint32_t imm, mve_pred_t p);
        T __arm_vcx3qa_m(int coproc, T acc, U n, V m, uint32_t imm, mve_pred_t p);
      
      The intrinsics are not part of the released ACLE spec, but internally at
      Arm we have reached consensus to add them to the next ACLE release.
      
      Reviewers: simon_tatham, MarkMurrayARM, ostannard, dmgreen
      
      Reviewed By: simon_tatham
      
      Subscribers: kristof.beyls, hiraditya, danielkiss, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D76610
      bb4da94e
    • Sam McCall's avatar
      [clangd] Support multiple cursors in selectionRange. · 8f237f9b
      Sam McCall authored
      Summary:
      One change: because there's no way to signal failure individually for
      each cursor, we now "succeed" with an empty range with no parent if a
      cursor doesn't point at anything.
      
      Reviewers: usaxena95
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D76741
      8f237f9b
    • Gabor Marton's avatar
    • zoecarver's avatar
      Add method to TargetInfo to get CPU cache line size · b915aec6
      zoecarver authored
      Summary:
      This patch adds a virtual method `getCPUCacheLineSize()` to `TargetInfo`. Currently, I've only implemented the method in `X86TargetInfo`. It's extremely important that each CPU's cache line size correct (e.g., we can't just define it as `64` across the board) so, it has been a little slow getting to this point.
      
      I'll work on the ARM CPUs next, but that will probably come later in a different patch.
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D74918
      b915aec6
    • Michael Kruse's avatar
      [clang] Reformat cindex. NFC. · 7520cf03
      Michael Kruse authored
      to reduce spurios changes in patches after clang-formatting them. In
      particular, these files contain long enums that clang-format reformats
      in their entirety if e.g. an element is added.
      
      Reviews having this problem include https://reviews.llvm.org/D76342 and
      https://reviews.llvm.org/D71447.
      7520cf03
    • Louis Dionne's avatar
    • Dmitry Vyukov's avatar
      tsan: fix leak of ThreadSignalContext for fibers · d8a0f76d
      Dmitry Vyukov authored
      When creating and destroying fibers in tsan a thread state
      is created and destroyed. Currently, a memory mapping is
      leaked with each fiber (in __tsan_destroy_fiber).
      This causes applications with many short running fibers
      to crash or hang because of linux vm.max_map_count.
      
      The root of this is that ThreadState holds a pointer to
      ThreadSignalContext for handling signals. The initialization
      and destruction of it is tied to platform specific events
      in tsan_interceptors_posix and missed when destroying a fiber
      (specifically, SigCtx is used to lazily create the
      ThreadSignalContext in tsan_interceptors_posix). This patch
      cleans up the memory by inverting the control from the
      platform specific code calling the generic ThreadFinish to
      ThreadFinish calling a platform specific clean-up routine
      after finishing a thread.
      
      The relevant code causing the leak with fibers is the fiber destruction:
      
      void FiberDestroy(ThreadState *thr, uptr pc, ThreadState *fiber) {
        FiberSwitchImpl(thr, fiber);
        ThreadFinish(fiber);
        FiberSwitchImpl(fiber, thr);
        internal_free(fiber);
      }
      
      I would appreciate feedback if this way of fixing the leak is ok.
      Also, I think it would be worthwhile to more closely look at the
      lifecycle of ThreadState (i.e. it uses no constructor/destructor,
      thus requiring manual callbacks for cleanup) and how OS-Threads/user
      level fibers are differentiated in the codebase. I would be happy to
      contribute more if someone could point me at the right place to
      discuss this issue.
      
      Reviewed-in: https://reviews.llvm.org/D76073
      Author: Florian (Florian)
      d8a0f76d
    • Dmitry Vyukov's avatar
      compiler-rt: allow golang race detector to run on musl-c · 5f149ef5
      Dmitry Vyukov authored
      tsan while used by golang's race detector was not working on alpine
      linux, since it is using musl-c instead of glibc. Since alpine is very
      popular distribution for container deployments, having working race
      detector would be nice. This commits adds some ifdefs to get it working.
      
      It fixes https://github.com/golang/go/issues/14481 on golang's issue tracker.
      
      Reviewed-in: https://reviews.llvm.org/D75849
      Author: graywolf-at-work (Tomas Volf)
      5f149ef5
    • Pavel Labath's avatar
      [lldb] add lit.local.cfg for breakpad tests · c7267539
      Pavel Labath authored
      The reason is to add .yaml as a valid test suffix. The test folder
      contains one yaml file, which wasn't being run because of that.
      
      Unsurprisingly the test fails, but this was not because the underlying
      functionality was broken, but rather because the test was setup
      incorrectly (most likely due to overly aggressive simplification of the
      test data on my part).
      
      Therefore this patch also tweaks the test inputs in order to test what
      they are supposed to test, and also updates some other breakpad tests
      (because they depend on the same inputs as this one) to be more
      realistic -- specifically it avoids putting symbols to the first page of
      the module, as that's where normally the COFF header would reside.
      c7267539
  2. Mar 25, 2020