1. May 24, 2019
    • Roman Lebedev's avatar
      [NFC] UpdateTestChecks: asm.py: fix whitespace issue · cb64cd9b
      Roman Lebedev authored
      llvm-svn: 361538
      cb64cd9b
    • Alina Sbirlea's avatar
      [SLPVectorizer] Set flag to previous default. · 63729b0c
      Alina Sbirlea authored
      Summary:
      The refactoring in r360276 moved the `RunSLPVectorization` flag and added the default explicitly. The default should have been `false`, as before.
      
      The new pass manager used to have SLPVectorization on by default, now it's off in opt, and needs D61617 checked in to enable it in clang.
      
      Reviewers: chandlerc
      
      Subscribers: mehdi_amini, jlebar, eraman, steven_wu, dexonsmith, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D61955
      
      llvm-svn: 361537
      63729b0c
    • Thomas Lively's avatar
      Fix unresolved symbols when linking tools/clang/unittests/Tooling/ToolingTests · a8e0d49c
      Thomas Lively authored
      Summary: Add correct cmake dependencies so that `ToolingTests` link
      successfully.
      
      Patch by Guanzhong Chen
      
      Reviewers: tlively, aheejin
      
      Reviewed By: tlively
      
      Subscribers: mgorny, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D62333
      
      llvm-svn: 361536
      a8e0d49c
    • Chris Bieneman's avatar
      [CMake] Fixing errors in r361513 · e836096f
      Chris Bieneman authored
      Summary:
      I somehow messed this up. libcxx appends the subdirectories itself, so we don't need to add them here.
      
      Also, r361513 broke the "projects" build of libcxx because it always included the extra targets.
      
      Reviewers: lebedev.ri, mclow.lists
      
      Subscribers: mgorny, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62336
      
      llvm-svn: 361535
      e836096f
    • Alina Sbirlea's avatar
      [NewPassManager] Add tuning option: SLPVectorization [clang-change] · 267ac925
      Alina Sbirlea authored
      Summary:
      NewPassManager is not using CodeGenOpts values before this patch.
      [to be coupled with D61616]
      
      Reviewers: chandlerc
      
      Subscribers: jlebar, cfe-commits, llvm-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D61617
      
      llvm-svn: 361534
      267ac925
    • Sanjay Patel's avatar
      [InstCombine] be more careful when transforming a shuffle mask · 3249be1e
      Sanjay Patel authored
      This is reduced from a fuzzer test:
      https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14890
      
      Usually, demanded elements should be able to simplify shuffle
      mask elements that are pointing to undef elements of its source
      operands, but that doesn't happen in the test case.
      
      llvm-svn: 361533
      3249be1e
    • Jordan Rupprecht's avatar
      [git] Be more specific when looking for llvm-svn · 4fb41a24
      Jordan Rupprecht authored
      Summary:
      A commit may, for some reason, have `llvm-svn:` in it multiple times. It may even take up the whole line and look identical to what gets added automatically when svn commits land in github.
      
      To workaround this, make changes to both lookups:
      
      1) When doing the git -> svn lookup, make sure to go through the whole message, and:
       a) Only look for llvm-svn starting at the beginning of the line (excluding the whitespace that `git log` adds).
       b) Take the last one (at the end of the commit message), if there are multiple matches.
      
      2) When doing the svn -> git lookup, look through a sizeable but still reasonably small number of git commits (10k, about 4-5 months right now), and:
       a) Only consider commits with the '^llvm-svn: NNNNNN' we expect, and
       b) Only consider those that also follow the same git -> svn matching above. (Error if it's not exactly one commit).
      
      Reviewers: jyknight
      
      Reviewed By: jyknight
      
      Subscribers: llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D60017
      
      llvm-svn: 361532
      4fb41a24
    • Antonio Afonso's avatar
      Test commit access by removing a empty line · 517e3cb0
      Antonio Afonso authored
      llvm-svn: 361531
      517e3cb0
    • Reid Kleckner's avatar
      [Driver] Move the "-o OUT -x TYPE SRC.c" flags to the end of -cc1 · 549ed544
      Reid Kleckner authored
      New -cc1 arguments, such as -faddrsig, have started appearing after the
      input name. I personally find it convenient for the input to be the last
      argument to the compile command line, since I often need to edit it when
      running crash reproduction scripts.
      
      Differential Revision: https://reviews.llvm.org/D62270
      
      llvm-svn: 361530
      549ed544
    • Alexey Bataev's avatar
      [OPENMP]Simplify codegen for the outlined regions. · 06e80f64
      Alexey Bataev authored
      Simplified codegen for the outlined regions, excluding duplication code
      for handling variables with the reference types.
      
      llvm-svn: 361529
      06e80f64
    • Jonas Devlieghere's avatar
      [HostNativeThreadBase] Undo nullptr changes · a21d5ab3
      Jonas Devlieghere authored
      The thread result type is an unsigned instead of a pointer on windows,
      so we shouldn't replace 0 with nullptr here.
      
      llvm-svn: 361528
      a21d5ab3
    • Robert Lougher's avatar
      Resubmit r360436 "[X86] Avoid SFB - Fix inconsistent codegen with/without debug info" · 170dfeb2
      Robert Lougher authored
      Fixes https://bugs.llvm.org/show_bug.cgi?id=40969
      
      The functions findPotentiallyBlockedCopies and buildCopy are currently not
      accounting for the presence of debug instructions. In the former this results
      in the optimization not being trigerred, and in the latter results in
      inconsistent codegen.
      
      This patch enables the optimization to be performed in a debug build and
      ensures the codegen is consistent with non-debug builds.
      
      Patch by Chris Dawson.
      
      Differential Revision: https://reviews.llvm.org/D61680
      
      llvm-svn: 361527
      170dfeb2
    • Thomas Lively's avatar
      [WebAssembly] Implement ReplaceNodeResults to fix a SIMD crash · e18b5c62
      Thomas Lively authored
      Reviewers: aheejin
      
      Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D61037
      
      llvm-svn: 361526
      e18b5c62
    • Roman Lebedev's avatar
      [NFC][PPC] Autogenerate vec_add_sub_quadword.ll test · 702a152e
      Roman Lebedev authored
      Being affected by (sub %x, C) -> add %X, (sub 0, C) 'for vectors' patch.
      
      llvm-svn: 361525
      702a152e
    • Roman Lebedev's avatar
      [NFC][PPC] Autogenerate vec_add_sub_doubleword.ll test · c8364ef5
      Roman Lebedev authored
      Being affected by (sub %x, C) -> add %X, (sub 0, C) 'for vectors' patch.
      
      llvm-svn: 361524
      c8364ef5
    • Roman Lebedev's avatar
      [NFC][Mips] Autogenerate msa/i5-s.ll test · a8a470c4
      Roman Lebedev authored
      Being affected by (sub %x, C) -> add %X, (sub 0, C) 'for vectors' patch.
      
      llvm-svn: 361523
      a8a470c4
    • Roman Lebedev's avatar
      [NFC][Mips] Autogenerate msa/arithmetic.ll test · 06688fe7
      Roman Lebedev authored
      Being affected by (sub %x, C) -> add %X, (sub 0, C) 'for vectors' patch.
      
      llvm-svn: 361522
      06688fe7
    • Roman Lebedev's avatar
      UpdateTestChecks: -march=mips/-march=mipsel is mips triple. · d19a36ef
      Roman Lebedev authored
      Again, a mixture of march and triple, with majority being march:
      
      llvm/test/CodeGen/Mips$ grep -ri triple | wc -l
      818
      llvm/test/CodeGen/Mips$ grep -ri march | wc -l
      1457
      
      llvm-svn: 361521
      d19a36ef
    • Nico Weber's avatar
      gn build: Merge r361418 more · 4d705461
      Nico Weber authored
      llvm-svn: 361520
      4d705461
    • Matt Arsenault's avatar
      AMDGPU/GlobalISel: Legality for integer min/max · 0f3ba44b
      Matt Arsenault authored
      llvm-svn: 361519
      0f3ba44b
    • Nico Weber's avatar
      lld-link, clang: Treat non-existent input files as possible spellos for option flags · 9b2830b4
      Nico Weber authored
      OptTable treats arguments starting with / that aren't a known option
      as filenames. This means lld-link's and clang-cl's typo correction for
      unknown flags didn't do spell checking for misspelled options that start
      with /.
      
      I first tried changing OptTable, but that got pretty messy, see PR41787
      comments 2 and 3.
      
      Instead, let lld-link's and clang's (including clang-cl's) "file not
      found" diagnostic check if a non-existent file looks like it could be a
      mis-spelled option, and if so add a "did you mean" suggestion to the
      "file not found" diagnostic.
      
      While here, make formatting of a few diagnostics a bit more
      self-consistent.
      
      Fixes PR41787.
      
      Differential Revision: https://reviews.llvm.org/D62276
      
      llvm-svn: 361518
      9b2830b4
    • Kit Barton's avatar
      [LOOPINFO] Extend Loop object to add utilities to get the loop bounds,... · 2049e4dd
      Kit Barton authored
          [LOOPINFO] Extend Loop object to add utilities to get the loop bounds, step, induction variable, and guard branch.
      
          Summary:
          This PR extends the loop object with more utilities to get loop bounds, step, induction variable, and guard branch. There already exists passes which try to obtain the loop induction variable in their own pass, e.g. loop interchange. It would be useful to have a common area to get these information. Moreover, loop fusion (https://reviews.llvm.org/D55851) is planning to use getGuard() to extend the kind of loops it is able to fuse, e.g. rotated loop with non-constant upper bound, which would have a loop guard.
      
            /// Example:
            /// for (int i = lb; i < ub; i+=step)
            ///   <loop body>
            /// --- pseudo LLVMIR ---
            /// beforeloop:
            ///   guardcmp = (lb < ub)
            ///   if (guardcmp) goto preheader; else goto afterloop
            /// preheader:
            /// loop:
            ///   i1 = phi[{lb, preheader}, {i2, latch}]
            ///   <loop body>
            ///   i2 = i1 + step
            /// latch:
            ///   cmp = (i2 < ub)
            ///   if (cmp) goto loop
            /// exit:
            /// afterloop:
            ///
            /// getBounds
            ///   getInitialIVValue      --> lb
            ///   getStepInst            --> i2 = i1 + step
            ///   getStepValue           --> step
            ///   getFinalIVValue        --> ub
            ///   getCanonicalPredicate  --> '<'
            ///   getDirection           --> Increasing
            /// getGuard             --> if (guardcmp) goto loop; else goto afterloop
            /// getInductionVariable          --> i1
            /// getAuxiliaryInductionVariable --> {i1}
            /// isCanonical                   --> false
      
          Committed on behalf of @Whitney (Whitney Tsang).
      
          Reviewers: kbarton, hfinkel, dmgreen, Meinersbur, jdoerfert, syzaara, fhahn
      
          Reviewed By: kbarton
      
          Subscribers: tvvikram, bmahjour, etiotto, fhahn, jsji, hiraditya, llvm-commits
      
          Tags: #llvm
      
          Differential Revision: https://reviews.llvm.org/D60565
      
      llvm-svn: 361517
      2049e4dd
    • Thomas Lively's avatar
      [WebAssembly] Add multivalue and tail-call target features · eafe8ef6
      Thomas Lively authored
      Summary:
      These features will both be implemented soon, so I thought I would
      save time by adding the boilerplate for both of them at the same time.
      
      Reviewers: aheejin
      
      Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D62047
      
      llvm-svn: 361516
      eafe8ef6
    • Thomas Preud'homme's avatar
      [FileCheck] Remove llvm:: prefix · 7b7683d7
      Thomas Preud'homme authored
      Summary:
      Remove all llvm:: prefixes in FileCheck library header and
      implementation except for calls to make_unique and make_shared since
      both files already use the llvm namespace.
      
      Reviewers: jhenderson, jdenny, probinson, arichardson
      
      Subscribers: hiraditya, arichardson, probinson, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62323
      
      llvm-svn: 361515
      7b7683d7
    • Yitzhak Mandelbaum's avatar
      [LibTooling] Fix dangling references in RangeSelector. · aa7a2c54
      Yitzhak Mandelbaum authored
      Summary:
      RangeSelector had a number of cases of capturing a StringRef in a lambda, which
      lead to dangling references. This change converts all uses in the API of
      `StringRef` to `std::string` to avoid this problem. `std::string` in the API is
      a reasonable choice, because the combinators are always storing the string
      beyond the life of the combinator construction.
      
      Reviewers: ilya-biryukov, gribozavr
      
      Subscribers: cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D62328
      
      llvm-svn: 361514
      aa7a2c54
    • Chris Bieneman's avatar
      [CMake] Copy C++ headers before configuring runtimes build · c5ec2a2b
      Chris Bieneman authored
      Summary: On some platforms C++ headers are packaged with the compiler not the sysroot. If you don't copy C++ headers into the build include directory during configuraiton of the outer build the C++ check during the runtime configuration may get inaccurate results.
      
      Reviewers: phosek, compnerd, smeenai, EricWF
      
      Reviewed By: compnerd
      
      Subscribers: EricWF, christof, libcxx-commits, mgorny, llvm-commits
      
      Tags: #llvm, #libc
      
      Differential Revision: https://reviews.llvm.org/D62155
      
      llvm-svn: 361513
      c5ec2a2b
    • Saleem Abdulrasool's avatar
      Transforms: lower fadd and fsub atomicrmw instructions · 7bbefb13
      Saleem Abdulrasool authored
      `fadd` and `fsub` have recently (r351850) been added as `atomicrmw`
      operations. This diff adds lowering cases for them to the LowerAtomic
      transform.
      
      Patch by Josh Berdine!
      
      llvm-svn: 361512
      7bbefb13
    • Ilya Biryukov's avatar
      [Index] Fix reported references in presence of template type aliases · 34675840
      Ilya Biryukov authored
      Summary: See the added test for an example.
      
      Reviewers: kadircet
      
      Reviewed By: kadircet
      
      Subscribers: jkorous, arphaman, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D62303
      
      llvm-svn: 361511
      34675840
    • Ilya Biryukov's avatar
      [CodeComplete] Only show lambda completions if patterns are requested · fd11a5f4
      Ilya Biryukov authored
      This is a trivial follow-up to r361461, so sending without review.
      
      llvm-svn: 361510
      fd11a5f4
    • Andrea Di Biagio's avatar
      [MCA] Add the ability to compute critical register dependency of an instruction. · 27b3b5d9
      Andrea Di Biagio authored
      This patch adds the methods `getCriticalRegDep()` and `computeCriticalRegDep()` to
      class InstructionBase.
      The goal is to allow users to obtain information about the critical register
      dependency that most affects the latency of an instruction.
      
      These methods are currently unused. However, the long term plan is to use them
      in order to allow the computation of a critical-path as part of the bottleneck
      analysis. So, this is yet another step towards fixing PR37494.
      
      llvm-svn: 361509
      27b3b5d9
    • Shoaib Meenai's avatar
      [AsmPrinter] Treat a narrowing PtrToInt like Trunc · 87226a72
      Shoaib Meenai authored
      When printing assembly for PtrToInt, AsmPrinter::lowerConstant
      incorrectly assumed that if PtrToInt was not converting to an
      int with exactly the same number of bits, it must be widening
      to a larger int. But this isn't necessarily true; PtrToInt can
      also shrink the size, which is useful when you want to produce
      a known 32-bit pointer on a 64-bit platform (on x86_64 ELF
      this yields a R_X86_64_32 relocation).
      
      The old behavior of falling through to the widening case for a
      narrowing PtrToInt yields bogus assembly code like this, which
      fails to assemble because the no-op bit and it accidentally
      creates is not a valid relocation:
      
      ```
              .long   a&-1
      ```
      
      The fix is to treat a narrowing PtrToInt exactly the same as
      it already treats Trunc: just emit the expression and let
      the assembler deal with truncating it in the appropriate way.
      
      Patch by Mat Hostetter <mjh@fb.com>.
      
      Differential Revision: https://reviews.llvm.org/D61325
      
      llvm-svn: 361508
      87226a72
    • Erich Keane's avatar
      Ensure builtins use the target default Calling Convention · 00022818
      Erich Keane authored
      r355317 changed builtins/allocation functions to use the default calling
      convention in order to support platforms that use non-cdecl calling
      conventions by default.
      
      However the default calling convention is overridable on Windows 32 bit
      implementations with some of the /G options. The intent is to permit the
      user to set the calling convention of normal functions, however it
      should NOT apply to builtins and C++ allocation functions.
      
      This patch ensures that the builtin/allocation functions always use the
      Target specific Calling Convention, ignoring the user overridden version
      of said default.
      
      llvm-svn: 361507
      00022818
    • Fangrui Song's avatar
      [Object] object::ELFObjectFile::symbol_begin(): skip symbol index 0 · 6aebd839
      Fangrui Song authored
      For clients iterating the symbol table, none expects to handle index 0
      (STN_UNDEF). Skip it to improve consistency with other binary formats.
      Clients that need STN_UNDEF (e.g. lld) can use
      getSectionContentsAsArray(). A test will be added in D62148.
      
      Reviewed By: mtrent
      
      Differential Revision: https://reviews.llvm.org/D62296
      
      llvm-svn: 361506
      6aebd839
  2. May 23, 2019