1. Jul 13, 2019
    • Ulrich Weigand's avatar
      [SystemZ] Add support for new cpu architecture - arch13 · b98bf60e
      Ulrich Weigand authored
      This patch series adds support for the next-generation arch13
      CPU architecture to the SystemZ backend.
      
      This includes:
      - Basic support for the new processor and its features.
      - Support for low-level builtins mapped to new LLVM intrinsics.
      - New high-level intrinsics in vecintrin.h.
      - Indicate support by defining  __VEC__ == 10303.
      
      Note: No currently available Z system supports the arch13
      architecture.  Once new systems become available, the
      official system name will be added as supported -march name.
      
      llvm-svn: 365933
      b98bf60e
    • Ulrich Weigand's avatar
      [SystemZ] Add support for new cpu architecture - arch13 · 0f0a8b77
      Ulrich Weigand authored
      This patch series adds support for the next-generation arch13
      CPU architecture to the SystemZ backend.
      
      This includes:
      - Basic support for the new processor and its features.
      - Assembler/disassembler support for new instructions.
      - CodeGen for new instructions, including new LLVM intrinsics.
      - Scheduler description for the new processor.
      - Detection of arch13 as host processor.
      
      Note: No currently available Z system supports the arch13
      architecture.  Once new systems become available, the
      official system name will be added as supported -march name.
      
      llvm-svn: 365932
      0f0a8b77
    • Leonard Chan's avatar
      Remove unused methods in Sancov. · 223573c8
      Leonard Chan authored
      llvm-svn: 365931
      223573c8
    • Thomas Lively's avatar
      [WebAssembly] i32.const operands should be signed · 26a6b95d
      Thomas Lively authored
      Summary:
      This was causing large addresses to be emitted as negative numbers,
      which rightfully caused crashes in binaryen.
      
      Reviewers: aheejin, dschuff
      
      Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D64612
      
      llvm-svn: 365930
      26a6b95d
    • Craig Topper's avatar
      [X86] Add NEG to isUseDefConvertible. · 98f93163
      Craig Topper authored
      We can use the C flag from NEG to detect that the input was zero.
      
      Really we could probably use the Z flag too. But C matches what
      we'd do for usubo 0, X.
      
      Haven't found a test case for this due to the usubo formation
      in CGP. But I verified if I comment out the CGP code this
      transformation catches some of the same cases.
      
      llvm-svn: 365929
      98f93163
    • Simon Pilgrim's avatar
      [X86][AVX] Add PR34359 shuffle test case. · ce8c35a3
      Simon Pilgrim authored
      llvm-svn: 365926
      ce8c35a3
    • Stefan Stipanovic's avatar
      [Attributor] Removing unnecessary `virtual` keywords. · 15e86f70
      Stefan Stipanovic authored
      Some function in the Attributor framework are unnecessarily
      marked virtual. This patch removes virtual keyword
      
      Reviewers: jdoerfert
      
      Subscribers: hiraditya, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D64637
      
      llvm-svn: 365925
      15e86f70
    • Hideto Ueno's avatar
      [Attributor] Deduce "nofree" function attribute · 65bbaf9e
      Hideto Ueno authored
      Summary: Deduce "nofree" function attribute. A more concise description of "nofree" is on D49165.
      
      Reviewers: jdoerfert
      
      Reviewed By: jdoerfert
      
      Subscribers: homerdin, hfinkel, lebedev.ri, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62687
      
      llvm-svn: 365924
      65bbaf9e
    • Louis Dionne's avatar
      [libc++] Add XFAILs for CTAD tests on older compilers · 189639b1
      Louis Dionne authored
      llvm-svn: 365923
      189639b1
    • Shoaib Meenai's avatar
      Revert [clang-shlib] Fix clang-shlib for PRIVATE dependencies · aaa49034
      Shoaib Meenai authored
      This reverts r365825 (git commit 3173c60f)
      
      This is breaking BUILD_SHARED_LIBS=ON builds. Reverting while I rethink it.
      
      llvm-svn: 365922
      aaa49034
    • Vitaly Buka's avatar
      CodeGet: Init 32bit pointers with 0xFFFFFFFF · c2ac925d
      Vitaly Buka authored
      Summary:
      Patch makes D63967 effective for 32bit platforms and improves pattern
      initialization there. It cuts size of 32bit binary compiled with
      -ftrivial-auto-var-init=pattern by 2% (3% with -Os).
      
      Binary size change on CTMark, (with -fuse-ld=lld -Wl,--icf=all, similar results with default linker options)
      ```
                         master           patch      diff
      Os pattern   7.915580e+05    7.698424e+05 -0.028387
      O3 pattern   9.953688e+05    9.752952e+05 -0.019325
      ```
      
      Zero vs Pattern on master
      ```
                     zero       pattern      diff
      Os     7.689712e+05  7.915580e+05  0.031380
      O3     9.744796e+05  9.953688e+05  0.021133
      ```
      
      Zero vs Pattern with the patch
      ```
                     zero       pattern      diff
      Os     7.689712e+05  7.698424e+05  0.000789
      O3     9.744796e+05  9.752952e+05  0.000742
      ```
      
      Reviewers: pcc, eugenis, glider, jfb
      
      Reviewed By: jfb
      
      Subscribers: hubert.reinterpretcast, dexonsmith, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D64597
      
      llvm-svn: 365921
      c2ac925d
    • Philip Reames's avatar
      [IndVars] Use exit count reasoning to discharge obviously untaken exits · 34495b55
      Philip Reames authored
      Continue in the spirit of D63618, and use exit count reasoning to prove away loop exits which can not be taken since the backedge taken count of the loop as a whole is provably less than the minimal BE count required to take this particular loop exit.
      
      As demonstrated in the newly added tests, this triggers in a number of cases where IndVars was previously unable to discharge obviously redundant exit tests. And some not so obvious ones.
      
      Differential Revision: https://reviews.llvm.org/D63733
      
      llvm-svn: 365920
      34495b55
    • Aaron Ballman's avatar
      Dump actual line numbers when dumping the AST to JSON. · 352f0a22
      Aaron Ballman authored
      The "line" attribute is now the physical line within the source file for the location. A "presumedLine" attribute is printed when the presumed line number does not match the given source line number. We continue to not print repeated line information in subsequent source locations, but we track presumed and actual lines separately.
      
      llvm-svn: 365919
      352f0a22
    • James Y Knight's avatar
      Fix some minor coding-style issues in git-llvm. · 8b76e622
      James Y Knight authored
      llvm-svn: 365918
      8b76e622
    • James Y Knight's avatar
      Allow the 'git-llvm' tool to push to svn from the split repositories · 541faedd
      James Y Knight authored
      for 'test-suite', 'lnt', 'zorg', and 'www'.
      
      This is done by looking at the pathname of the git remote named
      'origin', which is not 100% reliable, but should work in most cases.
      
      llvm-svn: 365917
      541faedd
    • Hideto Ueno's avatar
      [FunctionAttrs] Add a test for "nofree" function attribute · 8ea7326b
      Hideto Ueno authored
      This patch adds a test for nofree function attribute.
      
      llvm-svn: 365916
      8ea7326b
    • Fangrui Song's avatar
      [Support] Move the static initializer install_out_memory_new_handler to InitLLVM · e99dee82
      Fangrui Song authored
      An application linking against LLVMSupport should not get the gratuitous
      set::std_new_handler call.
      
      Reviewed By: jfb
      
      Differential Revision: https://reviews.llvm.org/D64505
      
      llvm-svn: 365915
      e99dee82
    • Simon Pilgrim's avatar
      Add missing <atomic> include to appease MSVC builds. · f72fd0fa
      Simon Pilgrim authored
      llvm-svn: 365914
      f72fd0fa
    • Artem Belevich's avatar
      Minor cleanup. · d9963b62
      Artem Belevich authored
      Simplify things a bit by removing unnecessary full type qualification.
      This also happens to avoid a build break with now-unsupported
      Visual Studio 2015.
      
      Differential Review: https://reviews.llvm.org/D64588
      
      llvm-svn: 365913
      d9963b62
    • Hideto Ueno's avatar
      Test commit · 81b7b2b5
      Hideto Ueno authored
      llvm-svn: 365912
      81b7b2b5
    • Jordan Rose's avatar
      Support for dumping current PrettyStackTrace on SIGINFO (Ctrl-T) · be28cdde
      Jordan Rose authored
      Support SIGINFO (and SIGUSR1 for POSIX purposes) to tell what
      long-running jobs are doing, as inspired by BSD tools (including on
      macOS), by dumping the current PrettyStackTrace.
      
      This adds a new kind of signal handler for non-fatal "info" signals,
      similar to the "interrupt" handler that already exists for SIGINT
      (Ctrl-C). It then uses that handler to update a "generation count"
      managed by the PrettyStackTrace infrastructure, which is then checked
      whenever a PrettyStackTraceEntry is pushed or popped on each
      thread. If the generation has changed---i.e. if the user has pressed
      Ctrl-T---the stack trace is dumped, though unfortunately it can't
      include the deepest entry because that one is currently being
      constructed/destructed.
      
      https://reviews.llvm.org/D63750
      
      llvm-svn: 365911
      be28cdde
  2. Jul 12, 2019
    • Jay Foad's avatar
      [AMDGPU] Fix DPP combiner check for exec modification · 27ec195f
      Jay Foad authored
      Summary:
      r363675 changed the exec modification helper function, now called
      execMayBeModifiedBeforeUse, so that if no UseMI is specified it checks
      all instructions in the basic block, even beyond the last use. That
      meant that the DPP combiner no longer worked in any basic block that
      ended with a control flow instruction, and in particular it didn't work
      on code sequences generated by the atomic optimizer.
      
      Fix it by reinstating the old behaviour but in a new helper function
      execMayBeModifiedBeforeAnyUse, and limiting the number of instructions
      scanned.
      
      Reviewers: arsenm, vpykhtin
      
      Subscribers: kzhuravl, nemanjai, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kbarton, MaskRay, jfb, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D64393
      
      llvm-svn: 365910
      27ec195f
    • Rafael Stahl's avatar
      [clang-format][tests] Explicitly specify style in some tests · f625a8a2
      Rafael Stahl authored
      Summary: This fixes broken tests when doing an out-of-source build that picks up a random .clang-format on the file system due to the default "file" style.
      
      Reviewers: djasper, klimek, MyDeveloperDay, krasimir
      
      Reviewed By: MyDeveloperDay
      
      Subscribers: lebedev.ri, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D61001
      
      llvm-svn: 365909
      f625a8a2
    • Raphael Isemann's avatar
      [lldb] Let table gen create command option initializers. · 6f4fb4e7
      Raphael Isemann authored
      Summary:
      We currently have man large arrays containing initializers for our command options.
      These tables are tricky maintain as we don't have any good place to check them for consistency and
      it's also hard to read (`nullptr, {}, 0` is not very descriptive).
      
      This patch fixes this by letting table gen generate those tables. This way we can have a more readable
      syntax for this (especially for all the default arguments) and we can let TableCheck check them
      for consistency (e.g. an option with an optional argument can't have `eArgTypeNone`, naming of flags', etc.).
      
      Also refactoring the related data structures can now be done without changing the hundred of option initializers.
      
      For example, this line:
      ```
      {LLDB_OPT_SET_ALL, false, "hide-aliases",         'a', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Hide aliases in the command list."},
      ```
      becomes this:
      ```
        def hide_aliases : Option<"hide-aliases", "a">, Desc<"Hide aliases in the command list.">;
      ```
      
      For now I just moved a few initializers to the new format to demonstrate the change. I'll slowly migrate the other
      option initializers tables  in separate patches.
      
      Reviewers: JDevlieghere, davide, sgraenitz
      
      Reviewed By: JDevlieghere
      
      Subscribers: jingham, xiaobai, labath, mgorny, abidh, lldb-commits
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D64365
      
      llvm-svn: 365908
      6f4fb4e7
    • Fangrui Song's avatar
      [LegacyPassManager] Small ModuleCount cleanup · 38cd3640
      Fangrui Song authored
      llvm-svn: 365907
      38cd3640
    • Russell Gallop's avatar
      Revert "[JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands." · 614a78c1
      Russell Gallop authored
      New test is failing on Windows bot
      
      This reverts commit 9c0391b3.
      
      llvm-svn: 365906
      614a78c1
    • Tom Stellard's avatar
      cmake: Fix install of libclang-cpp.so when LLVM_INSTALL_TOOLCHAIN_ONLY=ON · 1d062dae
      Tom Stellard authored
      Summary:
      If CLANG_LINK_CLANG_DYLIB is also enabled, then this library needs to be
      installed.
      
      Fixes PR42575.
      
      Reviewers: beanz, smeenai
      
      Subscribers: mgorny, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D64582
      
      Conflicts:
      	clang/tools/clang-shlib/CMakeLists.txt
      
      llvm-svn: 365905
      1d062dae
    • Jay Foad's avatar
      [AMDGPU] Restrict v_cndmask_b32 abs/neg modifiers to f32 · 7816ad91
      Jay Foad authored
      Summary:
      D64497 allowed abs/neg source modifiers on v_cndmask_b32 but it doesn't
      make any sense to apply them to f16 operands; they would interpret the
      bits of the value as an f32, giving nonsensical results. This patch
      restricts them to f32 operands.
      
      Reviewers: arsenm, hakzsam
      
      Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D64636
      
      llvm-svn: 365904
      7816ad91
    • Fangrui Song's avatar
      Delete dead stores · b251cc0d
      Fangrui Song authored
      llvm-svn: 365903
      b251cc0d
    • Tom Stellard's avatar
      cmake: Add INSTALL_WITH_TOOLCHAIN option to add_*_library macros · a196469e
      Tom Stellard authored
      Summary:
      This will simplify the macros by allowing us to remove the hard-coded
      list of libraries that should be installed when
      LLVM_INSTALL_TOOLCHAIN_ONLY is enabled.
      
      Reviewers: beanz, smeenai
      
      Reviewed By: beanz
      
      Subscribers: aheejin, mehdi_amini, mgorny, steven_wu, dexonsmith, cfe-commits, llvm-commits
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D64580
      
      llvm-svn: 365902
      a196469e
    • Fangrui Song's avatar
      Delete dead stores · 90e95bb2
      Fangrui Song authored
      llvm-svn: 365901
      90e95bb2
    • Aaron Ballman's avatar
      Dump floating-point values as strings when dumping to JSON. · 4d08f899
      Aaron Ballman authored
      This fixes a bug where we would have an invalid JSON attribute (e.g., "value": inf). It also increases the precision of the values because they're not represented as approximate doubles with the host architecture's floating-point model.
      
      llvm-svn: 365900
      4d08f899
    • Russell Gallop's avatar
      Revert "[clangd] Implement typeHierarchy/resolve for subtypes" · de54e2c4
      Russell Gallop authored
      Causing test failure on Windows bot
      
      This reverts commit 5b9484e5.
      
      llvm-svn: 365899
      de54e2c4
    • Fangrui Song's avatar
      [Driver] Delete dead code · e6e09561
      Fangrui Song authored
      llvm-svn: 365898
      e6e09561
    • Bryant Wong's avatar
      [gn] Tag unneeded variable. · 421c7918
      Bryant Wong authored
      When only building targets without assembly parsers (e.g. `llvm_targets_to_build
      = ["NVPTX"]`), `all_targets` is empty and causes GN to warn about an
      assigned-but-unused variable.
      
      Differential Revision: https://reviews.llvm.org/D31727
      
      llvm-svn: 365897
      421c7918
    • Simon Pilgrim's avatar
      [DAGCombine] narrowExtractedVectorBinOp - wrap subvector extraction in helper. NFCI. · 701e2c0d
      Simon Pilgrim authored
      First step towards supporting 'free' subvector extractions other than concat_vectors.
      
      llvm-svn: 365896
      701e2c0d
    • Alexey Bader's avatar
      [LIT] Emit timeout error message only if timeout was reached · 07cbeaa1
      Alexey Bader authored
      Summary:
      This improves readability of LIT output: previously
      error messages gets emitted that say that there was no error:
      
      error: command reached timeout: False
      
      Patch by Alexey Sachkov.
      
      Reviewers: ddunbar, mgorny, modocache
      
      Reviewed By: mgorny
      
      Subscribers: delcypher, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D64240
      
      llvm-svn: 365895
      07cbeaa1
    • Shaurya Gupta's avatar
      [clangd] Fixed toHalfOpenFileRange · 0d26d6f8
      Shaurya Gupta authored
      Summary:
      - Fixed toHalfOpenFileRange to work for macros as well as template
      instantiations
      - Added unit tests
      
      Breaking test case for older version of toHalfOpenFileRange:
      \# define FOO(X) X++
      int a = 1;
      int b = FOO(a);
      toHalfOpenFileRange for the sourceRange of VarDecl for b returned the
      wrong Range.
      
      Reviewers: sammccall, kadircet
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D64562
      
      llvm-svn: 365894
      0d26d6f8
    • David Bolvansky's avatar
      [InstCombine] Fold select (icmp sgt x, -1), lshr (X, Y), ashr (X, Y) to ashr (X, Y)) · af1b3185
      David Bolvansky authored
      Summary:
      (select (icmp sgt x, -1), lshr (X, Y), ashr (X, Y)) -> ashr (X, Y))
      (select (icmp slt x, 1), ashr (X, Y), lshr (X, Y)) -> ashr (X, Y))
      
      Fixes PR41173
      
      Alive proof by @lebedev.ri (thanks)
      Name: PR41173
        %cmp = icmp slt i32 %x, 1
        %shr = lshr i32 %x, %y
        %shr1 = ashr i32 %x, %y
        %retval.0 = select i1 %cmp, i32 %shr1, i32 %shr
        =>
        %retval.0 = ashr i32 %x, %y
      
      Optimization: PR41173
      Done: 1
      Optimization is correct!
      
      Reviewers: lebedev.ri, spatel
      
      Reviewed By: lebedev.ri
      
      Subscribers: nikic, craig.topper, llvm-commits, lebedev.ri
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D64285
      
      llvm-svn: 365893
      af1b3185
    • Alex Brachet's avatar
      Fix test case of llvm-nm using implicit a.out · 31188d07
      Alex Brachet authored
      llvm-svn: 365892
      31188d07